change xfce wallpaper to vlc or musikcube's current album art
all i want is to look at album art, huge.
i especially like this script for musikcube since it can't display images on its own but does cache album art. other than xfce
and vlc
or musikcube
, you'll need playerctl
, a program that controls media players. to find the name of your monitor/s, use xfconf-query --channel xfce4-desktop --list
.
originalwall1=$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image)
originalwall2=$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image)
vlcplaying() {
nowplaying=$(playerctl --player=vlc metadata mpris:artUrl | sed 's/.......//' | sed 's/%20/\ /g' | sed 's/%21/\!/g' | sed 's/%2C/\,/g' | sed 's/%27/\x27/g' | sed 's/%28/\(/g' | sed 's/%29/\)/g')
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image -s "$nowplaying"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image -s "$nowplaying"
}
vlcstopped() {
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image -s "$originalwall1"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image -s "$originalwall2"
}
while true
do
if [[ $(playerctl status --player=vlc --no-messages) = Playing ]]; then
vlcplaying
else
vlcstopped
fi
done
the musikcube version is pretty similar:
originalwall1=$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image)
originalwall2=$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image)
musikcubeplaying() {
nowplaying=$(playerctl --player=musikcube metadata mpris:artUrl)
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image -s "$nowplaying"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image -s "$nowplaying"
}
musikcubestopped() {
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorDVI-I-1/workspace0/last-image -s "$originalwall1"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-0/workspace0/last-image -s "$originalwall2"
}
while true
do
if [[ $(playerctl status --player=musikcube --no-messages) = Playing ]]; then
musikcubeplaying
else
musikcubestopped
fi
done
getting high quality album art
obviously, this works best with very high quality album art (or small displays, lol). if you want to fix up your collection's embedded artwork, you can download hq art from here and then embed it with programs like easytag
or ffmpeg
.
unlike most players vlc doesn't read directly from the files, but caches the first image it associates with an album, so after updating your collection, you should clear vlc's album art cache with rm -r $HOME/.cache/vlc/art
.