Even less lines by using playerctl itself to format

This commit is contained in:
Ferit Yiğit BALABAN 2022-04-22 02:23:06 +03:00
parent 581de8ddc9
commit e4797dd932

View File

@ -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