mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-22 01:48:59 +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)
|
||||
case $status in
|
||||
Playing|Paused)
|
||||
title="$(playerctl -p $mediaplayer metadata xesam:title)"
|
||||
artist="$(playerctl -p $mediaplayer metadata xesam:artist)"
|
||||
title="$(playerctl -p $mediaplayer metadata xesam:title | sed -e 's/&/\&/g' -e 's/</\</g')"
|
||||
artist="$(playerctl -p $mediaplayer metadata xesam:artist | sed -e 's/&/\&/g' -e 's/</\</g')"
|
||||
status="$status <span weight='light'><i>${title} (${artist})</i></span>"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -16,7 +16,7 @@ case $ROFI_RETV in
|
|||
case $(nmcli radio wifi) in
|
||||
enabled)
|
||||
printf "Turn wifi off\00info\037off\n"
|
||||
printf "Scan wifi networks\00info\037rescan\n"
|
||||
printf "Scan wifi networks...\00info\037rescan\n"
|
||||
;;
|
||||
disabled)
|
||||
printf "Turn wifi on\00info\037on\n"
|
||||
|
@ -24,10 +24,11 @@ case $ROFI_RETV in
|
|||
esac
|
||||
|
||||
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': *' '{
|
||||
property=$1;
|
||||
value=gensub(property ": *", "", 1);
|
||||
p[property]=gensub("<", "<", "g", value);
|
||||
p[property]=value;
|
||||
}
|
||||
($1 == "SIGNAL") {
|
||||
if (p["IN-USE"] == "*") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue