summaryrefslogtreecommitdiff
path: root/toggles/specialws.fish
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 17:54:37 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 17:54:37 +1100
commitee9977c26753088dfd20006fe3427737419ab264 (patch)
tree72087d2c1916b7faec165d76f21bcc2b35c8c547 /toggles/specialws.fish
parentmain: update help (diff)
downloadcaelestia-cli-ee9977c26753088dfd20006fe3427737419ab264.tar.gz
caelestia-cli-ee9977c26753088dfd20006fe3427737419ab264.tar.bz2
caelestia-cli-ee9977c26753088dfd20006fe3427737419ab264.zip
main: special workspace toggles
Diffstat (limited to 'toggles/specialws.fish')
-rwxr-xr-xtoggles/specialws.fish10
1 files changed, 10 insertions, 0 deletions
diff --git a/toggles/specialws.fish b/toggles/specialws.fish
new file mode 100755
index 0000000..445539d
--- /dev/null
+++ b/toggles/specialws.fish
@@ -0,0 +1,10 @@
+#!/bin/fish
+
+if ! hyprctl workspaces -j | jq -e 'first(.[] | select(.name == "special:special"))'
+ set activews (hyprctl activewindow -j | jq -r '.workspace.name')
+ string match -r -- '^special:' $activews && set togglews (string sub -s 9 $activews) || set togglews special
+else
+ set togglews special
+end
+
+hyprctl dispatch togglespecialworkspace $togglews