diff --git a/Droidnix/README.org b/Droidnix/README.org index 61eab131c..a533f16c1 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -488,7 +488,10 @@ let # Convert files to Home Manager xdg config entries 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}"; }; }); in diff --git a/Droidnix/assets/traveldroid/copy_2_home/.config/hypr/scripts/layout-selector.sh b/Droidnix/assets/traveldroid/copy_2_home/.config/hypr/scripts/layout-selector.sh new file mode 100755 index 000000000..7bfc0b3cc --- /dev/null +++ b/Droidnix/assets/traveldroid/copy_2_home/.config/hypr/scripts/layout-selector.sh @@ -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 diff --git a/Droidnix/generated/modules/traveldroid/apps/wofi.nix b/Droidnix/generated/modules/traveldroid/apps/wofi.nix index e22faa26c..5eed93538 100644 --- a/Droidnix/generated/modules/traveldroid/apps/wofi.nix +++ b/Droidnix/generated/modules/traveldroid/apps/wofi.nix @@ -14,7 +14,10 @@ let # Convert files to Home Manager xdg config entries 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}"; }; }); in