Fix wofi markup parsing for layout names with ampersands
Added --parse-search false to prevent wofi from trying to parse special characters like '&' in layout names (e.g. '[BOT & Left]')
This commit is contained in:
parent
487f1c8704
commit
af8f372739
@ -9,7 +9,7 @@ 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
|
||||||
choice=$(printf '%s\n' "${layouts[@]}" | wofi --dmenu -i -p "Waybar Layout")
|
choice=$(printf '%s\n' "${layouts[@]}" | wofi --dmenu -i -p "Waybar Layout" --parse-search false)
|
||||||
else
|
else
|
||||||
# Otherwise use a simple CLI menu
|
# Otherwise use a simple CLI menu
|
||||||
echo "Available Waybar Layouts:"
|
echo "Available Waybar Layouts:"
|
||||||
|
|||||||
@ -9,7 +9,7 @@ styles=($(ls "$waybar_styles"/*.css 2>/dev/null | xargs -n1 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
|
||||||
choice=$(printf '%s\n' "${styles[@]}" | wofi --dmenu -i -p "Waybar Style")
|
choice=$(printf '%s\n' "${styles[@]}" | wofi --dmenu -i -p "Waybar Style" --parse-search false)
|
||||||
else
|
else
|
||||||
# Otherwise use a simple CLI menu
|
# Otherwise use a simple CLI menu
|
||||||
echo "Available Waybar Styles:"
|
echo "Available Waybar Styles:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user