Last active
September 19, 2021 14:02
-
-
Save ohhskar/efe71e82337ed54b9aa704d3df28d2ae to your computer and use it in GitHub Desktop.
Spotifyd Notification using Playerctl and notify-send.sh
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 | |
if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ]; | |
then | |
trackName=$(playerctl metadata title) | |
artistAndAlbumName=$(playerctl metadata --format "{{ artist }} ({{ album }})") | |
notify-send -u low "$trackName" "$artistAndAlbumName " | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you specify the
-p
flag to only select spotifyd, you won't end up having it display the metadata from eg your browser.