Created
September 1, 2025 13:06
-
-
Save hxii/ec073b011ae35abf204af8d37b0508e3 to your computer and use it in GitHub Desktop.
Cider.sh SketchyBar Now Playing Info
This file contains hidden or 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 | |
| CIDER_TOKEN="" # Get Cider token from the app. | |
| # See: https://cider.sh/docs/client/rpc | |
| STATE="$(curl -s -H "apptoken: $CIDER_TOKEN" http://localhost:10767/api/v1/playback/is-playing | jq '.is_playing')" | |
| if [ "$STATE" = "true" ]; then | |
| MEDIA="$(curl -s -H "apptoken: $CIDER_TOKEN" http://localhost:10767/api/v1/playback/now-playing | jq -r '.info.artistName + " - " + .info.name')" | |
| sketchybar --set $NAME label="$MEDIA" drawing=on | |
| else | |
| sketchybar --set $NAME drawing=off | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment