aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-10-13 08:57:08 +0200
committerKarel Kočí <cynerd@email.cz>2020-10-13 08:57:08 +0200
commit8f4c8a944aa0a61e4c9660e6d3688134ac8a1d7a (patch)
treecd71cadb223f5e8a340806137dde6ef3ee2818ab
parentc877621d386a2fc1e39ae23b08518ad58622fc40 (diff)
downloadmyconfigs-8f4c8a944aa0a61e4c9660e6d3688134ac8a1d7a.tar.gz
myconfigs-8f4c8a944aa0a61e4c9660e6d3688134ac8a1d7a.tar.bz2
myconfigs-8f4c8a944aa0a61e4c9660e6d3688134ac8a1d7a.zip
config/i3blocks/scripts/mpd: fix invalid text on stop
-rwxr-xr-xconfig/i3blocks/scripts/mpd3
1 files changed, 2 insertions, 1 deletions
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