prevent issue with & in status text

This commit is contained in:
speedie 2022-11-16 22:09:38 +01:00
parent d2bb911f58
commit 8d09cc732b

View file

@ -32,6 +32,7 @@ SETMETHOD="speedwm -s" # Method used to set the status bar. speedwm -s will set
SEPARATOR="❰" # Separator to use. Alternative separators: "❰", "<", "|" SEPARATOR="❰" # Separator to use. Alternative separators: "❰", "<", "|"
CLICKABLE=true # Enable clickability (Requires dwm with statuscmd or speedwm) (true/false) CLICKABLE=true # Enable clickability (Requires dwm with statuscmd or speedwm) (true/false)
ITEM_ORDER="@2@3@11@4@1@6@8@5@9@7@10" # Item order. @1 means item 1, @6 means item 6 and so on. (text) ITEM_ORDER="@2@3@11@4@1@6@8@5@9@7@10" # Item order. @1 means item 1, @6 means item 6 and so on. (text)
AMP_IS_PANGO=true # Replace '&' with '&amp;'. This is necessary if you use the Pango dwm patch or speedwm. (true/false)
# Color options # Color options
BUILTINFG=true # Use built in colors for foreground (true/false) BUILTINFG=true # Use built in colors for foreground (true/false)
@ -243,7 +244,11 @@ setloading() {
# print data # print data
print() { print() {
setstatus "$(printf "$ITEMS_TEXT" | sed "s/stellar_amp/\&/g")" if [ "$AMP_IS_PANGO" = "false" ]; then
setstatus "$(printf "$ITEMS_TEXT" | sed "s/stellar_amp/\&/g")"
else
setstatus "$(printf "$ITEMS_TEXT" | sed "s/stellar_amp/\&amp\;/g")"
fi
} }
# set status2d compatible colors # set status2d compatible colors