Skip to content

Instantly share code, notes, and snippets.

@hxii
Created September 1, 2025 13:06
Show Gist options
  • Save hxii/ec073b011ae35abf204af8d37b0508e3 to your computer and use it in GitHub Desktop.
Save hxii/ec073b011ae35abf204af8d37b0508e3 to your computer and use it in GitHub Desktop.
Cider.sh SketchyBar Now Playing Info
#!/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