aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2018-12-30 23:07:23 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2018-12-30 23:07:23 +0100
commit06f12333659af8c23fce8f9383084c2c16b8d8b6 (patch)
treeef3072f2a6772697155a3be41790afa369cc5150 /i3blocks
parentd165a641d16c181e6251737b9c86d6bf178370be (diff)
downloadscripts-06f12333659af8c23fce8f9383084c2c16b8d8b6.tar.gz
scripts-06f12333659af8c23fce8f9383084c2c16b8d8b6.zip
i3music.sh now shows only filename when title doesn't exist.
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/i3music.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/i3blocks/i3music.sh b/i3blocks/i3music.sh
index 4811e08..24deb3f 100755
--- a/i3blocks/i3music.sh
+++ b/i3blocks/i3music.sh
@@ -12,7 +12,7 @@ stat="$(cmus-remote -Q | grep "status " | awk '{print $2}')"
artist="$(cmus-remote -Q | grep "tag artist " | cut -d' ' -f3-)"
title="$(cmus-remote -Q | grep "tag title " | cut -d' ' -f3-)"
[ -z "$artist" ] && artist="(unknown)"
-[ -z "$title" ] && title="$(cmus-remote -Q | grep "file " | cut -d'/' -f5-)"
+[ -z "$title" ] && title="[$(basename "$(cmus-remote -Q | grep "file " | cut -d'/' -f5-)")]"
if [ "$stat" = "playing" ]; then
echo "$symbol $artist ─ $title"
elif [ "$stat" = "paused" ]; then