diff options
Diffstat (limited to 'mac/.config/sketchybar/plugins/youtube-music.sh')
| -rwxr-xr-x | mac/.config/sketchybar/plugins/youtube-music.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mac/.config/sketchybar/plugins/youtube-music.sh b/mac/.config/sketchybar/plugins/youtube-music.sh index 6767275..eb4ef8e 100755 --- a/mac/.config/sketchybar/plugins/youtube-music.sh +++ b/mac/.config/sketchybar/plugins/youtube-music.sh @@ -5,12 +5,13 @@ SONG_INFO=$(curl -s 0.0.0.0:26538/api/v1/song-info) PAUSED="$(echo "$SONG_INFO" | jq -r '.isPaused')" CURRENT_SONG="$(echo "$SONG_INFO" | jq -r '.title + " - " + .artist')" ARTWORK="$(echo "$SONG_INFO" | jq -r '.imageSrc')" -ARTWORK_LOCATION="$(curl -O --output-dir "$TMPDIR" -s --remote-name -w "%{filename_effective}" "$ARTWORK")" +ARTWORK_LOCATION="$(curl -O --output-dir "${TMPDIR%/}" -s --remote-name -w "%{filename_effective}" "$ARTWORK")" if [ "$PAUSED" = true ]; then ICON= else ICON= fi -sketchybar --set "$NAME" label="$CURRENT_SONG" icon="$ICON" drawing=on -sketchybar --set "$NAME"-artwork background.image="$ARTWORK_LOCATION" + +sketchybar --set music-artwork background.image="$ARTWORK_LOCATION" +sketchybar --set music label="$CURRENT_SONG" icon="$ICON" drawing=on |
