aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local/bin/cycle-layout
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-25 21:54:04 -0600
committerCraig Jennings <c@cjennings.net>2026-01-25 21:54:04 -0600
commitaa00b0251bb013ff508bdb9d8bf3292e52c87703 (patch)
treeba61a39385ef1ee79de8cf2d1ecd49ecba2837cb /dotfiles/hyprland/.local/bin/cycle-layout
parent17eab3b5d184b838ac5ba4d1c8ba0fa4bcc92620 (diff)
downloadarchsetup-aa00b0251bb013ff508bdb9d8bf3292e52c87703.tar.gz
archsetup-aa00b0251bb013ff508bdb9d8bf3292e52c87703.zip
feat(hyprland): add plugins and simplify layouts
Plugins installed via hyprpm: - hy3: i3-style manual tiling with tab groups (monocle) - hyprscrolling: PaperWM-style horizontal scrolling - xtra-dispatchers: throwunfocused, bringallfrom, closeunfocused Layout system simplified to 4 modes: - Master (tile) - default DWM-style - Tab group (monocle) - via hy3 plugin - Scrolling - horizontal columns - Floating New scripts: - layout-navigate: layout-aware j/k navigation - Updated cycle-layout: cycles through 4 layouts - Updated waybar-layout: icons for new layouts Other changes: - Add hyprpm reload to startup - Add cpio and fc-cache to archsetup - Remove SSH fuzzel picker (conflicted with scrolling keybind) - Add slidevert animation for scratchpads - Update todo.org with plugin evaluation notes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/hyprland/.local/bin/cycle-layout')
-rwxr-xr-xdotfiles/hyprland/.local/bin/cycle-layout49
1 files changed, 24 insertions, 25 deletions
diff --git a/dotfiles/hyprland/.local/bin/cycle-layout b/dotfiles/hyprland/.local/bin/cycle-layout
index a3b1b1a..ebfd2e0 100755
--- a/dotfiles/hyprland/.local/bin/cycle-layout
+++ b/dotfiles/hyprland/.local/bin/cycle-layout
@@ -1,30 +1,29 @@
#!/bin/sh
# Cycle through Hyprland layouts
+# Cycle: master -> hy3 (tab/monocle) -> scrolling -> floating -> master
LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str')
-ORIENTATION=""
+FLOATING=$(hyprctl activewindow -j 2>/dev/null | jq -r '.floating // false')
-if [ "$LAYOUT" = "master" ]; then
- ORIENTATION=$(hyprctl getoption master:orientation -j | jq -r '.str')
-fi
-
-# Cycle: master-left -> master-top -> master-center -> dwindle -> master-left
-if [ "$LAYOUT" = "dwindle" ]; then
- hyprctl keyword general:layout master
- hyprctl keyword master:orientation left
-elif [ "$LAYOUT" = "master" ]; then
- case "$ORIENTATION" in
- left)
- hyprctl keyword master:orientation top
- ;;
- top)
- hyprctl keyword master:orientation center
- ;;
- center)
- hyprctl keyword general:layout dwindle
- ;;
- *)
- hyprctl keyword master:orientation left
- ;;
- esac
-fi
+# Check if we're in "all floating" mode by checking layout
+case "$LAYOUT" in
+ master)
+ hyprctl keyword general:layout hy3
+ # Create tab group for monocle behavior
+ hyprctl dispatch hy3:changegroup tab
+ ;;
+ hy3)
+ hyprctl keyword general:layout scrolling
+ ;;
+ scrolling)
+ # Switch to master but float all windows
+ hyprctl keyword general:layout master
+ hyprctl dispatch workspaceopt allfloat
+ ;;
+ *)
+ # Return to master tiled
+ hyprctl dispatch workspaceopt allfloat
+ hyprctl keyword general:layout master
+ hyprctl keyword master:orientation left
+ ;;
+esac