1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-17 12:22:57 +00:00
dotfiles/.local/bin/awall

14 lines
700 B
Plaintext
Raw Normal View History

2020-10-13 20:14:57 +00:00
#!/bin/sh
2020-08-22 04:14:05 +00:00
if [[ "$#" -ge 1 ]]; then
rm ~/Pictures/.wallp
2021-01-28 21:23:04 +00:00
echo ~/Pictures/Awall/$@* > ~/Pictures/.wallp
2020-08-22 04:14:05 +00:00
fi
pkill -f "mpv.*wallpaper"
2021-01-28 21:23:04 +00:00
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
2021-01-28 21:23:04 +00:00
ffmpeg -i $(cat ~/Pictures/.wallp) -vframes 1 -y ~/Pictures/Awall/wall.png
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/.config/kitty/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