Better nowplaying script in Bash

This commit is contained in:
Ferit Yiğit BALABAN 2022-04-28 02:23:28 +03:00
parent c7728f91ac
commit 1be65ef5c0

View File

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