mirror of https://github.com/tiyn/dotfiles
parent
46c0a4785c
commit
3c74e16454
@ -1,5 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Sets the background.
|
|
||||||
wallDir=~/.config/wallpaper/$(date | awk '{print $1}')
|
# In LARBS, ~/.config/wall.png is the location of the system wallpaper. This
|
||||||
currWall=$wallDir/$(ls $wallDir | shuf -n 1)
|
# script, if given an argument, moves it there. This script without an
|
||||||
xwallpaper --zoom $currWall
|
# argument sets ~/.config/wall.png as the wallpaper, which is required on login
|
||||||
|
# if you don't want a black screen.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
[ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
||||||
|
|
||||||
|
[ -d "$1" ] && cp "$(find "$1" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen."
|
||||||
|
|
||||||
|
# If pywal is installed, use it.
|
||||||
|
type wal >/dev/null 2>&1 && { wal -c
|
||||||
|
wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun
|
||||||
|
xsetroot -name "fsignal:xrdb"
|
||||||
|
killall dwmblocks
|
||||||
|
setsid dwmblocks >/dev/null & } >/dev/null 2>&1
|
||||||
|
|
||||||
|
xwallpaper --zoom ~/.config/wall.png
|
||||||
|
Loading…
Reference in new issue