From 8f4c8a944aa0a61e4c9660e6d3688134ac8a1d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 13 Oct 2020 08:57:08 +0200 Subject: config/i3blocks/scripts/mpd: fix invalid text on stop --- config/i3blocks/scripts/mpd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/i3blocks') diff --git a/config/i3blocks/scripts/mpd b/config/i3blocks/scripts/mpd index c99597e..0f3764d 100755 --- a/config/i3blocks/scripts/mpd +++ b/config/i3blocks/scripts/mpd @@ -20,7 +20,8 @@ case "$BLOCK_BUTTON" in ;; esac -if [[ "$status" == **(playing|paused)* ]]; then +if [ "$(echo "$status" | wc -l)" -gt 1 ] && \ + [[ "$status" == **(playing|paused)* ]]; then echo "$status" | head -1 echo case "$status" in -- cgit v1.2.3