feat(hypr): add keybind to move window and focus
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 57s
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 57s
This commit is contained in:
parent
f9b3c2f260
commit
6bea524df0
@ -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,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 = 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,1,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 1
|
||||||
bind = SUPER,2,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 2
|
bind = SUPER,2,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 2
|
||||||
bind = SUPER,3,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 3
|
bind = SUPER,3,exec,~/.config/hypr/scripts/focus-workspace-mon.bash 3
|
||||||
|
@ -2,12 +2,17 @@
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
local workspace_id="${1}"
|
local workspace_id="${1}"
|
||||||
|
local should_change_focus="${2:-0}"
|
||||||
|
|
||||||
local focused_monitor
|
local focused_monitor
|
||||||
focused_monitor="$(hyprctl monitors -j | jq -c '.[] | select(.focused)' | jq -r '.name')"
|
focused_monitor="$(hyprctl monitors -j | jq -c '.[] | select(.focused)' | jq -r '.name')"
|
||||||
|
|
||||||
hyprctl dispatch movetoworkspacesilent "${workspace_id}"
|
hyprctl dispatch movetoworkspacesilent "${workspace_id}"
|
||||||
hyprctl dispatch movecurrentworkspacetomonitor "${focused_monitor}"
|
hyprctl dispatch movecurrentworkspacetomonitor "${focused_monitor}"
|
||||||
|
|
||||||
|
if (( should_change_focus == 1 )); then
|
||||||
|
hyprctl dispatch workspace "${workspace_id}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
Loading…
Reference in New Issue
Block a user