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