Created
May 3, 2015 08:41
-
-
Save pandada8/733a45e7e3aa9e70a7f3 to your computer and use it in GitHub Desktop.
Change the gnome background intervally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
shopt -s nullglob | |
cd ~/Wallpaper | |
while true; do | |
files=() | |
for i in *.jpg *.png; do | |
[[ -f $i ]] && files+=("$i") | |
done | |
range=${#files[@]} | |
((range)) && gsettings set org.gnome.desktop.background picture-uri "file:///home/pan/Wallpaper/${files[RANDOM % range]}" | |
sleep 5m | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment