2023-10-20 13:15:49 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-10-20 23:57:52 +02:00
|
|
|
|
|
|
|
#STATUS=$(cmus-remote -Q | grep status | cut --delimiter=' ' --fields=2)
|
|
|
|
STATUS=$(playerctl status)
|
|
|
|
|
|
|
|
#TITLE=$(cmus-remote -Q | grep title | cut --delimiter=' ' --fields=3-)
|
|
|
|
TITLE=$(playerctl metadata title)
|
|
|
|
#ARTIST=$(cmus-remote -Q | grep ' artist ' | cut --delimiter=' ' --fields=3-)
|
|
|
|
ARTIST=$(playerctl metadata artist)
|
|
|
|
|
|
|
|
if [ $STATUS = "Playing" ] ; then
|
|
|
|
ICON=" "
|
|
|
|
elif [ $STATUS = "Paused" ] ; then
|
|
|
|
ICON=" "
|
|
|
|
else
|
|
|
|
ICON=""
|
|
|
|
fi
|
2023-10-20 13:15:49 +02:00
|
|
|
|
|
|
|
if [ -n "$ARTIST" ] || [ -n "$TITLE" ] ; then
|
2023-10-20 23:57:52 +02:00
|
|
|
echo "$ICON $ARTIST - $TITLE"
|
2023-10-20 13:15:49 +02:00
|
|
|
fi
|