Skip to content

Instantly share code, notes, and snippets.

@pandada8
Created July 20, 2015 01:45
Show Gist options
  • Save pandada8/2dc1c969ed9256f44ec5 to your computer and use it in GitHub Desktop.
Save pandada8/2dc1c969ed9256f44ec5 to your computer and use it in GitHub Desktop.
wallpaper
#!/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)) && feh --bg-scale "${files[RANDOM % range]}"
sleep 5m
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment