commit 8881586969730f65158fa68afc49e04832b2ef37 parent c2bb490ba5e7ec89120ae886e9355e19b6d71da2 Author: gearsix <gearsix@tuta.io> Date: Sun, 25 Sep 2022 17:50:41 +0100 added src/posix/gnome-shell-cycle-wallpaper.sh Diffstat:
A | src/posix/gnome-shell-cycle-wallpaper.sh | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/posix/gnome-shell-cycle-wallpaper.sh b/src/posix/gnome-shell-cycle-wallpaper.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +# cycles the desktop background to a random image from $XDG_PICTURES_DIR/wallpapers +# updated to work with Ubuntu 22 + +. "$HOME/.config/user-dirs.dirs" +WALLPAPERS_DIR=$XDG_PICTURES_DIR/wallpapers/ + +selection=$(find "$WALLPAPERS_DIR" -type f | shuf -n1) +gsettings set org.gnome.desktop.background picture-uri "file://$selection" +gsettings set org.gnome.desktop.background picture-uri-dark "file://$selection"