Even less lines by using playerctl itself to format
This commit is contained in:
parent
581de8ddc9
commit
e4797dd932
@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ $(playerctl status) = 'Playing' ]; then
|
if [ $(playerctl status) = 'Playing' ]; then
|
||||||
a=$( playerctl metadata artist )
|
echo $( playerctl -f '{{trunc(xesam:artist, 20)}} - {{trunc(xesam:title, 30)}}' metadata )
|
||||||
t=$( playerctl metadata title )
|
|
||||||
echo "$a - $t"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user