From 01abbff07781d55101f5a347634de49631709579 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 6 Sep 2024 10:34:05 +0800 Subject: more hyprland scripts --- hyprworkspaceswitch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 hyprworkspaceswitch (limited to 'hyprworkspaceswitch') 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 + -- cgit v1.2.3