mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-26 08:43:19 +00:00
13 lines
624 B
Bash
Executable file
13 lines
624 B
Bash
Executable file
#!/bin/sh
|
|
if [ "$#" -ge 1 ]; then
|
|
rm ~/Pictures/.wallp
|
|
echo ~/Pictures/Awall/"$1"* > ~/Pictures/.wallp
|
|
fi
|
|
pkill -f "mpv.*wallpaper"
|
|
nohup xwinwrap -ni -fdt -fs -- mpv -wid WID "$(cat ~/Pictures/.wallp)" --profile=wallpaper >/dev/null 2>&1 &
|
|
if [ "$#" -ge 1 ]; then
|
|
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"/Pictures/Awall/wall.png
|
|
fi
|