dev-environment-files/.config/sketchybar/plugins/media.sh

10 lines
245 B
Bash
Raw Normal View History

#!/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