From ac9beaa242d4b407f04ff72c56e0097ec55d992d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 21 Jul 2021 09:55:50 +0200 Subject: [PATCH] rofi-*: properly escape for pango markup --- bin/rofi-mediaplayer | 4 ++-- bin/rofi-wifi | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/rofi-mediaplayer b/bin/rofi-mediaplayer index 148c208..1a36bfc 100755 --- a/bin/rofi-mediaplayer +++ b/bin/rofi-mediaplayer @@ -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/${title} (${artist})" ;; esac diff --git a/bin/rofi-wifi b/bin/rofi-wifi index d0bbb45..3524478 100755 --- a/bin/rofi-wifi +++ b/bin/rofi-wifi @@ -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/