mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-17 12:22:57 +00:00
13 lines
615 B
Bash
Executable file
13 lines
615 B
Bash
Executable file
#!/bin/bash
|
|
if [[ "$#" -ge 1 ]]; then
|
|
rm ~/Pictures/.wallp
|
|
echo ~/Pictures/Awall/"$1"* > ~/Pictures/.wallp
|
|
fi
|
|
pkill -f "mpv.*wallpaper"
|
|
xwinwrap -ni -fdt -fs -- mpv -wid WID "$(cat ~/Pictures/.wallp)" --profile=wallpaper & disown
|
|
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
|