Created
August 12, 2020 23:16
-
-
Save hamptonmoore/5061e307d9f9c472b61307ef48896d81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
METADATA=$(playerctl metadata --format "{{ title }} - {{ artist }}" 2>&1) | |
if [ "$METADATA" = "No player could handle this command" ]; then | |
echo "" | |
else # Can be configured to output differently when player is paused | |
polybar-msg -p "$(pgrep -f "polybar top")" hook spotify-play-pause 1 >/dev/null | |
echo "$METADATA" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment