diff --git a/nowplaying.sh b/nowplaying.sh index c91980f..146e427 100755 --- a/nowplaying.sh +++ b/nowplaying.sh @@ -1,5 +1,8 @@ #!/bin/bash -if [ $(playerctl status) = 'Playing' ]; then +status=$( playerctl status ) +if [ $? -eq 0 ]; then echo $( playerctl -f '{{trunc(xesam:artist, 20)}} - {{trunc(xesam:title, 30)}}' metadata ) +else + echo "" fi exit 0