Regenerated
This commit is contained in:
+4
-1
@@ -488,7 +488,10 @@ let
|
|||||||
|
|
||||||
# Convert files to Home Manager xdg config entries
|
# Convert files to Home Manager xdg config entries
|
||||||
wofiFiles = lib.genAttrs assetFiles (f: {
|
wofiFiles = lib.genAttrs assetFiles (f: {
|
||||||
name = ".config/${programName}/${f}";
|
name =
|
||||||
|
if f == "wofi.conf" then ".config/wofi/config"
|
||||||
|
else if f == "theming.css" then ".config/wofi/style.css"
|
||||||
|
else ".config/wofi/${f}";
|
||||||
value = { source = "${assetPath}/${f}"; };
|
value = { source = "${assetPath}/${f}"; };
|
||||||
});
|
});
|
||||||
in
|
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
|
||||||
@@ -14,7 +14,10 @@ let
|
|||||||
|
|
||||||
# Convert files to Home Manager xdg config entries
|
# Convert files to Home Manager xdg config entries
|
||||||
wofiFiles = lib.genAttrs assetFiles (f: {
|
wofiFiles = lib.genAttrs assetFiles (f: {
|
||||||
name = ".config/${programName}/${f}";
|
name =
|
||||||
|
if f == "wofi.conf" then ".config/wofi/config"
|
||||||
|
else if f == "theming.css" then ".config/wofi/style.css"
|
||||||
|
else ".config/wofi/${f}";
|
||||||
value = { source = "${assetPath}/${f}"; };
|
value = { source = "${assetPath}/${f}"; };
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user