sketchybar: init
This commit is contained in:
parent
ded82a8f8b
commit
ae71080920
10 changed files with 182 additions and 96 deletions
10
stow/.config/sketchybar/plugins/music.sh
Executable file
10
stow/.config/sketchybar/plugins/music.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# sketchybar doesn't like it when the line doesn't end with a carriage return
|
||||
SONG="$(osascript -e 'tell application "Music" to if player state is playing then artist of current track & " - " & name of current track' | head -c 65 && echo '\r')"
|
||||
|
||||
if [[ "$(echo $SONG | wc -w | sed 's/ //g')" != "0" ]]; then
|
||||
sketchybar --set "$NAME" label="${SONG}" background.drawing=true icon.drawing=true
|
||||
else
|
||||
sketchybar --set "$NAME" label="" background.drawing=false icon.drawing=false
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue