mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-22 09:53:28 +02:00
rofi-*: properly escape for pango markup
This commit is contained in:
parent
40d8aece8d
commit
ac9beaa242
2 changed files with 5 additions and 4 deletions
|
@ -41,8 +41,8 @@ EOF
|
||||||
status=$(playerctl -p $mediaplayer status)
|
status=$(playerctl -p $mediaplayer status)
|
||||||
case $status in
|
case $status in
|
||||||
Playing|Paused)
|
Playing|Paused)
|
||||||
title="$(playerctl -p $mediaplayer metadata xesam:title)"
|
title="$(playerctl -p $mediaplayer metadata xesam:title | sed -e 's/&/\&/g' -e 's/</\</g')"
|
||||||
artist="$(playerctl -p $mediaplayer metadata xesam:artist)"
|
artist="$(playerctl -p $mediaplayer metadata xesam:artist | sed -e 's/&/\&/g' -e 's/</\</g')"
|
||||||
status="$status <span weight='light'><i>${title} (${artist})</i></span>"
|
status="$status <span weight='light'><i>${title} (${artist})</i></span>"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -16,7 +16,7 @@ case $ROFI_RETV in
|
||||||
case $(nmcli radio wifi) in
|
case $(nmcli radio wifi) in
|
||||||
enabled)
|
enabled)
|
||||||
printf "Turn wifi off\00info\037off\n"
|
printf "Turn wifi off\00info\037off\n"
|
||||||
printf "Scan wifi networks\00info\037rescan\n"
|
printf "Scan wifi networks...\00info\037rescan\n"
|
||||||
;;
|
;;
|
||||||
disabled)
|
disabled)
|
||||||
printf "Turn wifi on\00info\037on\n"
|
printf "Turn wifi on\00info\037on\n"
|
||||||
|
@ -24,10 +24,11 @@ case $ROFI_RETV in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
nmcli -f IN-USE,SSID,BSSID,SECURITY,FREQ,SIGNAL -m multiline device wifi list --rescan no \
|
nmcli -f IN-USE,SSID,BSSID,SECURITY,FREQ,SIGNAL -m multiline device wifi list --rescan no \
|
||||||
|
| sed -e 's/&/\&/g' -e 's/</\</g' \
|
||||||
| awk -F': *' '{
|
| awk -F': *' '{
|
||||||
property=$1;
|
property=$1;
|
||||||
value=gensub(property ": *", "", 1);
|
value=gensub(property ": *", "", 1);
|
||||||
p[property]=gensub("<", "<", "g", value);
|
p[property]=value;
|
||||||
}
|
}
|
||||||
($1 == "SIGNAL") {
|
($1 == "SIGNAL") {
|
||||||
if (p["IN-USE"] == "*") {
|
if (p["IN-USE"] == "*") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue