19 lines
372 B
Bash
Executable File
19 lines
372 B
Bash
Executable File
#!/bin/sh
|
|
|
|
STATUS="$(playerctl -p firefox status)"
|
|
|
|
if [ -z "$STATUS" ] || [ "$STATUS" = "Stopped" ]; then
|
|
exit 0
|
|
elif [ "$STATUS" = "Paused" ]; then
|
|
STATUS=" "
|
|
elif [ "$STATUS" = "Playing" ]; then
|
|
STATUS=" "
|
|
else
|
|
exit 0
|
|
fi
|
|
|
|
TITLE="$(playerctl -p firefox metadata title)"
|
|
ARTIST="$(playerctl -p firefox metadata artist)"
|
|
|
|
printf "%s\n" "$STATUS$TITLE - $ARTIST"
|