dotfiles/eww/scripts/spotify_art

7 lines
323 B
Text
Raw Permalink Normal View History

2022-05-22 15:32:36 -04:00
#!/usr/bin/bash
TRACK=$(playerctl --player=spotify metadata | grep trackid | awk '{print $3}')
RESOURCE=$(curl -sX GET "https://open.spotify.com/oembed?url=$TRACK" | jq '.thumbnail_url' | awk '{print substr($1, 2, length($1)-2)}')
curl -sX GET "$RESOURCE" --output "/home/val/.config/eww/scripts/tmp/art"
return $RESOURCE