helm/home/darwin/sketchybar/plugins/spotify.sh
Anish Lakhwara 2ca6feff4d WIP: Integration branch with darwin and deck support
- Added darwin and jovian inputs
- Added platform-specific package configurations
- Added darwinConfigurations and deck nixosConfiguration
- Copied darwin and deck specific files
- Fixed darwin version compatibility

Some configurations still need debugging
2025-09-12 14:26:38 -07:00

12 lines
319 B
Bash
Executable file

#!/usr/bin/env bash
STATE="$(echo "$INFO" | jq -r '.state')"
APP="$(echo "$INFO" | jq -r '.app')"
if [ "$STATE" = "playing" ] && [ "$APP" == "Spotify" ]; then
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
sketchybar --set "$NAME" label="$MEDIA" drawing=on
else
sketchybar --set "$NAME" drawing=off
fi