dotfiles/bin/awall

13 lines
615 B
Plaintext
Raw Normal View History

#!/bin/bash
2020-08-22 04:14:05 +00:00
if [[ "$#" -ge 1 ]]; then
rm ~/Pictures/.wallp
echo ~/Pictures/Awall/"$1"* > ~/Pictures/.wallp
2020-08-22 04:14:05 +00:00
fi
pkill -f "mpv.*wallpaper"
xwinwrap -ni -fdt -fs -- mpv -wid WID "$(cat ~/Pictures/.wallp)" --profile=wallpaper & disown
2020-08-22 04:14:05 +00:00
if [[ "$#" -ge 1 ]]; then
ffmpeg -i "$(cat ~/Pictures/.wallp)" -vframes 1 -y ~/Pictures/Awall/wall.png
2021-01-28 21:23:04 +00:00
convert ~/Pictures/Awall/wall.png -interpolate Integer -filter point -resize 1920x1080 -gravity center -background black -extent 1920x1080 ~/Pictures/Awall/wall.png
gsettings set org.gnome.desktop.background picture-uri file://"$HOME"/Pictures/Awall/wall.png
2020-08-22 04:14:05 +00:00
fi