Regenerated

This commit is contained in:
2026-03-26 17:23:20 +00:00
parent 3a4998acfb
commit bf160e963a
46 changed files with 3403 additions and 32 deletions
@@ -25,8 +25,7 @@ bind = ALT, TAB, cyclenext,
# bind = ALT SHIFT, TAB, cyclenext prev
# switch layouts
# $MOD+A opens layout selector
bind = $MOD+A, exec, ~/.config/hypr/scripts/layout-selector.sh
# Hyprscrolling
bind = $mainMod, period, layoutmsg, move +col
@@ -36,7 +35,7 @@ bind = $mainMod, S, togglegroup
# Cycle tabs in the group
bind = $mainMod, L, changegroupactive, f
bind = $mainMod, H, changegroupactive, b
bind = $mainMod, T, exec, ~/.config/hypr/scripts/toggle-layout-scrolling-dwindle.sh
bind = $mainMod, T, exec, ~/.config/hypr/scripts/layout-selector.sh
# Focus movement
bind = $mainMod, H, movefocus, l
@@ -0,0 +1 @@
workspace_layouts = dwindle, master, scrolling, monocle
@@ -1,25 +1,34 @@
#!/usr/bin/env bash
# layout-selector.sh
# Cycles through layouts using Wofi for selection, commits on key choice
# Select a workspace layout using Wofi, shows description, applies with layoutmsg
# Hyprland workspace info
CURRENT_WS=$(hyprctl activeworkspace -j | jq -r '.id')
CURRENT_LAYOUT=$(hyprctl workspaces -j | jq -r ".[] | select(.id==$CURRENT_WS) | .layout")
# Define layouts and descriptions
declare -A LAYOUTS=(
[dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively"
[master]=" Master: One main window, others stacked"
[scrolling]=" Scrolling: Vertical list, scroll through windows"
[monocle]=" Monocle: One window fills the screen"
[floating]=" Floating: Free move & resize"
)
ORDER=(dwindle master scrolling monocle floating)
# Define your layouts (change as you like)
LAYOUTS=("master-stack" "monocle" "bsp" "grid" "floating")
# Prepare Wofi menu: show "layoutname: description"
MENU_ITEMS=()
for key in "${ORDER[@]}"; do
MENU_ITEMS+=("$key: ${LAYOUTS[$key]}")
done
# Show selection menu via Wofi
CHOICE=$(printf '%s\n' "${LAYOUTS[@]}" | wofi --dmenu --prompt "Select Layout")
CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout")
# If user cancelled
# Exit if cancelled
[ -z "$CHOICE" ] && exit 0
# Skip if already current layout
[ "$CHOICE" == "$CURRENT_LAYOUT" ] && exit 0
# Extract layout name from selection (before colon)
LAYOUT_NAME="${CHOICE%%:*}"
# Apply the layout
hyprctl dispatch workspace "$CURRENT_WS" layout "$CHOICE"
# Apply layout via layoutmsg
hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME"
# Show OSD feedback
hyprctl dispatch oSD "Layout: $CHOICE" 2000
hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000