Keep the wallpaper when movie restores the screen layout
.fehbg now saves its random picks to ~/.cache/wallpapers and redraws them with --keep; screen-layout passes this through with --keep-wallpaper, used by movie.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Sets a random wallpaper on each monitor; with --keep, redraws the last ones picked instead.
|
||||
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/wallpapers
|
||||
|
||||
if [[ $1 != --keep || ! -s $cache ]]; then
|
||||
# One image per connected output, so --keep still has enough after an output was off
|
||||
count=$(xrandr --query | grep -c ' connected')
|
||||
shuf -n "$count" -e ~/.local/share/backgrounds/random/* > "$cache"
|
||||
fi
|
||||
|
||||
mapfile -t walls < "$cache"
|
||||
exec /usr/bin/feh --no-fehbg --bg-fill "${walls[@]}"
|
||||
Reference in New Issue
Block a user