Fix critical bug in switcher scripts array building
Fixed broken array building that was splitting filenames with spaces/brackets: - Changed from: layouts=$(($command)) which splits on whitespace - Changed to: mapfile -t which preserves full filenames This fixes: - Wofi showing 69 broken fragments instead of 25 layouts - Wofi showing 83 broken fragments instead of 30 styles - Symlinks pointing to non-existent fragmented paths - Layouts not actually changing when selected Also repaired broken config symlink that pointed to non-existent /home/nicholai/.config/waybar/configs/BOT] back to working Custom Minimal layout.
This commit is contained in:
parent
600a35020b
commit
2fa5c52963
2
config
2
config
@ -1 +1 @@
|
|||||||
configs/[TOP] Custom Minimal
|
/home/nicholai/.config/waybar/configs/[TOP] Custom Minimal
|
||||||
@ -4,8 +4,8 @@
|
|||||||
waybar_layouts="$HOME/.config/waybar/configs"
|
waybar_layouts="$HOME/.config/waybar/configs"
|
||||||
waybar_config="$HOME/.config/waybar/config"
|
waybar_config="$HOME/.config/waybar/config"
|
||||||
|
|
||||||
# Get all available layouts
|
# Get all available layouts (using mapfile to preserve filenames with spaces)
|
||||||
layouts=($(ls "$waybar_layouts" | sort))
|
mapfile -t layouts < <(ls "$waybar_layouts" | sort)
|
||||||
|
|
||||||
# If wofi is available, use it for selection
|
# If wofi is available, use it for selection
|
||||||
if command -v wofi &> /dev/null; then
|
if command -v wofi &> /dev/null; then
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
waybar_styles="$HOME/.config/waybar/style"
|
waybar_styles="$HOME/.config/waybar/style"
|
||||||
waybar_css="$HOME/.config/waybar/style.css"
|
waybar_css="$HOME/.config/waybar/style.css"
|
||||||
|
|
||||||
# Get all available styles
|
# Get all available styles (using mapfile to preserve filenames with spaces)
|
||||||
styles=($(ls "$waybar_styles"/*.css 2>/dev/null | xargs -n1 basename | sort))
|
mapfile -t styles < <(find "$waybar_styles" -maxdepth 1 -type f -name "*.css" -exec basename {} \; | sort)
|
||||||
|
|
||||||
# If wofi is available, use it for selection
|
# If wofi is available, use it for selection
|
||||||
if command -v wofi &> /dev/null; then
|
if command -v wofi &> /dev/null; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user