Add toggle for switching between dwindle/scrolling layout per workspace on Super + L

This commit is contained in:
David Heinemeier Hansson
2026-02-28 14:23:42 +01:00
parent b746958823
commit 42a437ad48
4 changed files with 19 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Toggle the layout on the current active workspace between dwindle and scrolling
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id')
CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout')
case "$CURRENT_LAYOUT" in
dwindle) NEW_LAYOUT=scrolling ;;
*) NEW_LAYOUT=dwindle ;;
esac
hyprctl keyword workspace $ACTIVE_WORKSPACE, layout:$NEW_LAYOUT
notify-send "󱂬 Workspace layout set to $NEW_LAYOUT"