2020-02-08 23:43:37 +00:00
|
|
|
#!/bin/sh
|
2019-05-31 23:38:43 +00:00
|
|
|
|
|
|
|
# In LARBS, ~/.config/wall.png is the location of the system wallpaper. This
|
|
|
|
# script, if given an argument, moves it there. This script without an
|
|
|
|
# argument sets ~/.config/wall.png as the wallpaper, which is required on login
|
2020-02-09 14:24:13 +00:00
|
|
|
# if you don't want a black screen.
|
2020-03-15 22:10:59 +00:00
|
|
|
#
|
|
|
|
# You may also give a directory name to select a random image from that
|
|
|
|
# directory as a wallpaper. Be careful that the directory only has images.
|
2019-05-31 23:38:43 +00:00
|
|
|
|
2020-03-15 22:10:59 +00:00
|
|
|
[ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
|
|
|
|
|
|
|
[ -d "$1" ] && mv "$(find "$1" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen."
|
2020-02-09 14:24:13 +00:00
|
|
|
|
|
|
|
# If pywal is installed, use it.
|
2020-03-13 16:31:19 +00:00
|
|
|
type wal >/dev/null 2>&1 && { wal -c ;
|
2020-02-09 14:24:13 +00:00
|
|
|
wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun;
|
|
|
|
xsetroot -name "fsignal:xrdb";
|
|
|
|
killall dwmblocks;
|
|
|
|
setsid dwmblocks >/dev/null 2>&1 & }
|
|
|
|
|
2019-02-18 21:16:01 +00:00
|
|
|
xwallpaper --zoom ~/.config/wall.png
|