diff --git a/dots/.config/hypr/conf/core/bindings.conf b/dots/.config/hypr/conf/core/bindings.conf index 89c1a644..b488242f 100644 --- a/dots/.config/hypr/conf/core/bindings.conf +++ b/dots/.config/hypr/conf/core/bindings.conf @@ -104,6 +104,9 @@ bind = SUPERSHIFT,right,exec,~/.config/hypr/scripts/focus-workspace-mon.bash $(( bind = SUPERCTRL,left,exec,~/.config/hypr/scripts/move-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') - 1 )) bind = SUPERCTRL,right,exec,~/.config/hypr/scripts/move-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') + 1 )) +bind = SUPERSHIFTCTRL,left,exec,~/.config/hypr/scripts/move-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') - 1 )) 1 +bind = SUPERSHIFTCTRL,right,exec,~/.config/hypr/scripts/move-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') + 1 )) 1 + bind = SUPER,1,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 1 bind = SUPER,2,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 2 bind = SUPER,3,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 3 diff --git a/dots/.config/hypr/scripts/move-workspace-mon.bash b/dots/.config/hypr/scripts/move-workspace-mon.bash index 777f2d90..7e0fd680 100755 --- a/dots/.config/hypr/scripts/move-workspace-mon.bash +++ b/dots/.config/hypr/scripts/move-workspace-mon.bash @@ -2,12 +2,17 @@ main() { local workspace_id="${1}" + local should_change_focus="${2:-0}" local focused_monitor focused_monitor="$(hyprctl monitors -j | jq -c '.[] | select(.focused)' | jq -r '.name')" hyprctl dispatch movetoworkspacesilent "${workspace_id}" hyprctl dispatch movecurrentworkspacetomonitor "${focused_monitor}" + + if (( should_change_focus == 1 )); then + hyprctl dispatch workspace "${workspace_id}" + fi } main "${@}"