Regenerated
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# layout-selector.sh
|
||||
# Cycles through layouts using Wofi for selection, commits on key choice
|
||||
|
||||
# Hyprland workspace info
|
||||
CURRENT_WS=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
CURRENT_LAYOUT=$(hyprctl workspaces -j | jq -r ".[] | select(.id==$CURRENT_WS) | .layout")
|
||||
|
||||
# Define your layouts (change as you like)
|
||||
LAYOUTS=("master-stack" "monocle" "bsp" "grid" "floating")
|
||||
|
||||
# Show selection menu via Wofi
|
||||
CHOICE=$(printf '%s\n' "${LAYOUTS[@]}" | wofi --dmenu --prompt "Select Layout")
|
||||
|
||||
# If user cancelled
|
||||
[ -z "$CHOICE" ] && exit 0
|
||||
|
||||
# Skip if already current layout
|
||||
[ "$CHOICE" == "$CURRENT_LAYOUT" ] && exit 0
|
||||
|
||||
# Apply the layout
|
||||
hyprctl dispatch workspace "$CURRENT_WS" layout "$CHOICE"
|
||||
|
||||
# Show OSD feedback
|
||||
hyprctl dispatch oSD "Layout: $CHOICE" 2000
|
||||
Reference in New Issue
Block a user