summaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local
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
commitff88fc3cd752c34f364526683222deb0a7e5bbbf (patch)
tree82c69bca2d01331f02c9be5f31f616e8616c0b18 /dotfiles/hyprland/.local
parente601c536ec79e9c46105cdbc67825e0cd97e7818 (diff)
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')
-rwxr-xr-xdotfiles/hyprland/.local/bin/cycle-layout49
-rwxr-xr-xdotfiles/hyprland/.local/bin/layout-navigate58
-rwxr-xr-xdotfiles/hyprland/.local/bin/waybar-layout52
3 files changed, 99 insertions, 60 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
diff --git a/dotfiles/hyprland/.local/bin/layout-navigate b/dotfiles/hyprland/.local/bin/layout-navigate
new file mode 100755
index 0000000..ec2f659
--- /dev/null
+++ b/dotfiles/hyprland/.local/bin/layout-navigate
@@ -0,0 +1,58 @@
+#!/bin/sh
+# Layout-aware navigation for Hyprland
+# Usage: layout-navigate <direction> [move]
+# direction: next|prev
+# move: if present, move window instead of focus
+
+DIR="$1"
+MOVE="$2"
+LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str')
+
+case "$LAYOUT" in
+ scrolling)
+ if [ "$MOVE" = "move" ]; then
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch layoutmsg movewindowto r
+ else
+ hyprctl dispatch layoutmsg movewindowto l
+ fi
+ else
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch layoutmsg focus r
+ else
+ hyprctl dispatch layoutmsg focus l
+ fi
+ fi
+ ;;
+ hy3)
+ if [ "$MOVE" = "move" ]; then
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch hy3:movewindow r
+ else
+ hyprctl dispatch hy3:movewindow l
+ fi
+ else
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch hy3:movefocus r
+ else
+ hyprctl dispatch hy3:movefocus l
+ fi
+ fi
+ ;;
+ *)
+ # master, dwindle, etc.
+ if [ "$MOVE" = "move" ]; then
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch layoutmsg swapnext
+ else
+ hyprctl dispatch layoutmsg swapprev
+ fi
+ else
+ if [ "$DIR" = "next" ]; then
+ hyprctl dispatch layoutmsg cyclenext
+ else
+ hyprctl dispatch layoutmsg cycleprev
+ fi
+ fi
+ ;;
+esac
diff --git a/dotfiles/hyprland/.local/bin/waybar-layout b/dotfiles/hyprland/.local/bin/waybar-layout
index 7ffb8a8..6c45877 100755
--- a/dotfiles/hyprland/.local/bin/waybar-layout
+++ b/dotfiles/hyprland/.local/bin/waybar-layout
@@ -1,54 +1,36 @@
#!/bin/sh
# Hyprland layout indicator for waybar
# Shows current layout with nerd font icons
+# Layouts: master -> tab group (monocle) -> scrolling -> floating
# Get current layout
LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str')
-# Get master orientation if using master layout
-ORIENTATION=""
-if [ "$LAYOUT" = "master" ]; then
- ORIENTATION=$(hyprctl getoption master:orientation -j | jq -r '.str')
-fi
-
-# Check if active window is fullscreen (monocle)
-FULLSCREEN=$(hyprctl activewindow -j | jq -r '.fullscreen')
+# Check if workspace has allfloat enabled
+ALLFLOAT=$(hyprctl activeworkspace -j | jq -r '.hasfullscreenwindow')
# Check if active window is floating
-FLOATING=$(hyprctl activewindow -j | jq -r '.floating')
+FLOATING=$(hyprctl activewindow -j 2>/dev/null | jq -r '.floating // false')
+
+# Check workspace rules for allfloat
+WSRULES=$(hyprctl activeworkspace -j | jq -r '.rules // []')
# Determine icon and tooltip
-if [ "$FULLSCREEN" = "2" ] || [ "$FULLSCREEN" = "1" ]; then
- ICON="󰊓"
- TOOLTIP="Monocle (fullscreen)"
-elif [ "$FLOATING" = "true" ]; then
+if [ "$LAYOUT" = "master" ] && echo "$WSRULES" | grep -q "allfloat"; then
ICON="󰖲"
TOOLTIP="Floating"
-elif [ "$LAYOUT" = "dwindle" ]; then
- ICON="󱒎"
- TOOLTIP="Dwindle"
+elif [ "$LAYOUT" = "scrolling" ]; then
+ ICON="󰯍"
+ TOOLTIP="Scrolling"
+elif [ "$LAYOUT" = "hy3" ]; then
+ ICON="󰖯"
+ TOOLTIP="Tab Group (Monocle)"
elif [ "$LAYOUT" = "master" ]; then
- case "$ORIENTATION" in
- left)
- ICON="󰕰"
- TOOLTIP="Master (left)"
- ;;
- top)
- ICON="󱂩"
- TOOLTIP="Master (top)"
- ;;
- center)
- ICON="󰘸"
- TOOLTIP="Master (center)"
- ;;
- *)
- ICON="󰕰"
- TOOLTIP="Master"
- ;;
- esac
+ ICON="󰕰"
+ TOOLTIP="Master"
else
ICON="󰕰"
- TOOLTIP="Unknown"
+ TOOLTIP="$LAYOUT"
fi
echo "{\"text\": \"<span size='large'>$ICON</span>\", \"tooltip\": \"$TOOLTIP\"}"