You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
601 B
Bash

#!/usr/bin/env bash
player_status=$(playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo -e "$(playerctl metadata --format '{{markup_escape(title)}}')\nPlaying: $(playerctl metadata --format '{{markup_escape(artist)}}') - $(playerctl metadata --format '{{markup_escape(title)}}')\nplaying"
elif [ "$player_status" = "Paused" ]; then
echo -e "$(playerctl metadata --format '{{markup_escape(title)}}')\nPaused: $(playerctl metadata --format '{{markup_escape(artist)}}') - $(playerctl metadata --format '{{markup_escape(title)}}')\npaused"
else
echo -e ""
fi