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