dotfiles/.local/bin/awall

12 lines
424 B
Bash
Executable File

#!/bin/sh
if [[ "$#" -ge 1 ]]; then
rm ~/Pictures/.wallp
ln -s ~/Pictures/Awall/$@* ~/Pictures/.wallp
fi
pkill -f "mpv.*wallpaper"
xwinwrap -ni -fdt -fs -- mpv -wid WID ~/Pictures/.wallp --profile=wallpaper & disown
if [[ "$#" -ge 1 ]]; then
ffmpeg -i ~/Pictures/.wallp -vframes 1 -y ~/Pictures/Awall/wall.png
gsettings set org.gnome.desktop.background picture-uri "file://$HOME/Pictures/Awall/wall.png"
fi