Fix sb-music to reduce clutter

This commit is contained in:
Alexis Jhon Gaspar 2023-09-22 20:32:39 +08:00
parent 2151f02b91
commit 33325cb475
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ Block blocks[] = {
{"sb-disk", 1800, 1 },
{"sb-memory", 10, 2 },
{"sb-loadavg", 5, 3 },
{"sb-music", 0, 4 },
{"sb-music", 0, 4 },
{"sb-volume", 1, 5 },
{"sb-date", 1, 6 },
{"sb-user", 0, 7 },

View file

@ -18,7 +18,7 @@ if status="$(playerctl "$@" status 2>&1)" && [ "$status" != "Stopped" ]; then
currentSong="$(playerctl "$@" metadata --format "{{title}} - {{artist}}")"
else
[ "$(mpc status "%state%")" = "paused" ] && icon="$pausedIcon"
currentSong="$(mpc current -f "%title%[ - %artist%]")"
currentSong="$(mpc current -f "%title%")"
fi
[ -z "$currentSong" ] && exit