dev-environment-files/.config/sketchybar/plugins/media.sh
2024-01-08 17:39:56 -04:00

9 lines
245 B
Bash
Executable file

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