Fix error message when nothing is playing
This commit is contained in:
parent
e4797dd932
commit
f21f3f71f0
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/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 )
|
echo $( playerctl -f '{{trunc(xesam:artist, 20)}} - {{trunc(xesam:title, 30)}}' metadata )
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user