Skip to content

Instantly share code, notes, and snippets.

@apkostka
Created March 15, 2018 19:11
Show Gist options
  • Save apkostka/748c00ffcd88b836ba3ece50d751b000 to your computer and use it in GitHub Desktop.
Save apkostka/748c00ffcd88b836ba3ece50d751b000 to your computer and use it in GitHub Desktop.
#!/bin/sh
player_status=$(playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo "$(playerctl metadata artist) - $(playerctl metadata title)"
elif [ "$player_status" = "Paused" ]; then
echo "Paused - $(playerctl metadata artist) - $(playerctl metadata title)"
else
echo "#3"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment