From 939eaadf73edaf69a0343db2868bf1e44830d28f Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 14 May 2018 12:18:21 +0100 Subject: [PATCH] Make media player block only append artist if it is defined --- i3/blocks/mediaplayer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i3/blocks/mediaplayer b/i3/blocks/mediaplayer index f8136ad5..2dfc80ba 100755 --- a/i3/blocks/mediaplayer +++ b/i3/blocks/mediaplayer @@ -20,7 +20,9 @@ artist=$($COMMAND metadata artist | sed "s/\&/\&/g") if [ "$title" != "(null)" ]; then ret="$title" - ret="$ret - $artist" + if [ -n "$artist" ]; then + ret="$ret - $artist" + fi echo "$ret"; fi