diff options
Diffstat (limited to 'hyprworkspaceswitch')
| -rwxr-xr-x | hyprworkspaceswitch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hyprworkspaceswitch b/hyprworkspaceswitch new file mode 100755 index 0000000..6d5a014 --- /dev/null +++ b/hyprworkspaceswitch @@ -0,0 +1,14 @@ +#!/bin/bash + +cworkspace=$(hyprctl activeworkspace -j | jq '.id') + +echo $cworkspace +echo $1 +if [ $cworkspace -eq $1 ]; then + exit 1 +elif [ $cworkspace -gt $1 ]; then + for ((i=$cworkspace; i>=$1+1; i--)); do hyprctl dispatch workspace -1; done +elif [ $cworkspace -lt $1 ]; then + for ((i=$cworkspace; i<=$1-1; i++)); do hyprctl dispatch workspace +1; done +fi + |
