push changes
This commit is contained in:
@@ -27,7 +27,7 @@ markup_escape() {
|
||||
icon_markup() {
|
||||
local icon="$1"
|
||||
local color="$2"
|
||||
printf '<span font_desc="SauceCodePro Nerd Font 15" foreground="%s">%s</span>' "$color" "$icon"
|
||||
printf '<span font_desc="SauceCodePro Nerd Font 14" foreground="%s">%s</span>' "$color" "$icon"
|
||||
}
|
||||
|
||||
truncate_text() {
|
||||
@@ -151,7 +151,7 @@ art_url=$(playerctl -p "$PLAYER" metadata mpris:artUrl 2>/dev/null || true)
|
||||
state_class=$(printf '%s' "$status" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [[ "$state_class" == "stopped" ]]; then
|
||||
text_markup="<span foreground=\"#D8DEE9\">Stopped</span> $(icon_markup "" "#D08770") $(icon_markup "" "#A3BE8C")"
|
||||
text_markup="$(icon_markup "" "#D08770") $(icon_markup " " "#A3BE8C")<span foreground=\"#D8DEE9\">Stopped</span>"
|
||||
printf '{"text":"%s","class":"stopped","alt":"stopped"}\n' "$(json_escape "$text_markup")"
|
||||
exit 0
|
||||
fi
|
||||
@@ -209,7 +209,7 @@ Left click: play/pause | Scroll: next/prev
|
||||
EOF
|
||||
)
|
||||
|
||||
text_markup="<span foreground=\"$track_color\">$(markup_escape "$display_track")</span> $(icon_markup "$state_icon" "$state_color") $(icon_markup "$app_icon" "$app_color")"
|
||||
text_markup="$(icon_markup "$state_icon" "$state_color") $(icon_markup "$app_icon " "$app_color")<span foreground=\"$track_color\">$(markup_escape "$display_track")</span>"
|
||||
|
||||
printf '{"text":"%s","tooltip":"%s","class":"%s","alt":"%s"}\n' \
|
||||
"$(json_escape "$text_markup")" \
|
||||
|
||||
Reference in New Issue
Block a user