Fix hyprland bind script
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -49,33 +49,25 @@
|
||||
"$mod, 9, exec, ${bindHelper} 9"
|
||||
"$mod, 0, exec, ${bindHelper} 10"
|
||||
|
||||
"$mod_Shift, 1, exec, ${bindHelper} 1 move"
|
||||
"$mod_Shift, 2, exec, ${bindHelper} 2 move"
|
||||
"$mod_Shift, 3, exec, ${bindHelper} 3 move"
|
||||
"$mod_Shift, 4, exec, ${bindHelper} 4 move"
|
||||
"$mod_Shift, 5, exec, ${bindHelper} 5 move"
|
||||
"$mod_Shift, 6, exec, ${bindHelper} 6 move"
|
||||
"$mod_Shift, 7, exec, ${bindHelper} 7 move"
|
||||
"$mod_Shift, 8, exec, ${bindHelper} 8 move"
|
||||
"$mod_Shift, 9, exec, ${bindHelper} 9 move"
|
||||
"$mod_Shift, 0, exec, ${bindHelper} 1 move0"
|
||||
"$mod_Ctrl, 1, exec, ${bindHelper} -m 1"
|
||||
"$mod_Ctrl, 2, exec, ${bindHelper} -m 2"
|
||||
"$mod_Ctrl, 3, exec, ${bindHelper} -m 3"
|
||||
"$mod_Ctrl, 4, exec, ${bindHelper} -m 4"
|
||||
"$mod_Ctrl, 5, exec, ${bindHelper} -m 5"
|
||||
"$mod_Ctrl, 6, exec, ${bindHelper} -m 6"
|
||||
"$mod_Ctrl, 7, exec, ${bindHelper} -m 7"
|
||||
"$mod_Ctrl, 8, exec, ${bindHelper} -m 8"
|
||||
"$mod_Ctrl, 9, exec, ${bindHelper} -m 9"
|
||||
"$mod_Ctrl, 0, exec, ${bindHelper} -m 10"
|
||||
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, l, movefocus, r"
|
||||
|
||||
"$mod_Shift, left, movewindow, l"
|
||||
"$mod_Shift, h, movewindow, l"
|
||||
"$mod_Shift, down, movewindow, d"
|
||||
"$mod_Shift, j, movewindow, d"
|
||||
"$mod_Shift, up, movewindow, u"
|
||||
"$mod_Shift, k, movewindow, u"
|
||||
"$mod_Shift, right, movewindow, r"
|
||||
"$mod_Shift, l, movewindow, r"
|
||||
|
||||
"$mod, Tab, cyclenext"
|
||||
@@ -94,13 +86,9 @@
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mod_Ctrl, left, resizeactive, -20 0"
|
||||
"$mod_Ctrl, h, resizeactive, -20 0"
|
||||
"$mod_Ctrl, down, resizeactive, 0 20"
|
||||
"$mod_Ctrl, j, resizeactive, 0 20"
|
||||
"$mod_Ctrl, up, resizeactive, 0 -20"
|
||||
"$mod_Ctrl, k, resizeactive, 0 -20"
|
||||
"$mod_Ctrl, right, resizeactive, 20 0"
|
||||
"$mod_Ctrl, l, resizeactive, 20 0"
|
||||
];
|
||||
|
||||
|
@@ -1,7 +1,16 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
MOVE=false
|
||||
|
||||
while getopts "m" opt; do
|
||||
case $opt in
|
||||
m) MOVE=true ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
SELECTED_WORKSPACE_BASE="$1"
|
||||
ACTION="$2"
|
||||
|
||||
BLOCK_SIZE=10
|
||||
|
||||
@@ -19,7 +28,7 @@ if [ "$target_workspace_id" -eq "$current_workspace_id" ]; then
|
||||
target_workspace_id=$((next_block * BLOCK_SIZE + SELECTED_WORKSPACE_BASE))
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "move" ]; then
|
||||
if [ "$MOVE" = true ]; then
|
||||
hyprctl dispatch movetoworkspacesilent "$target_workspace_id"
|
||||
else
|
||||
hyprctl dispatch workspace "$target_workspace_id"
|
||||
|
Reference in New Issue
Block a user