Skip to content

Instantly share code, notes, and snippets.

@kevinbarbour
Created July 11, 2012 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinbarbour/3091644 to your computer and use it in GitHub Desktop.
Save kevinbarbour/3091644 to your computer and use it in GitHub Desktop.
Shitty work in progress random wallpaper switching bash script
#!/bin/bash
# directory of wallpapers
DIR="$HOME/pictures/wallpapers"
# list of possible wallpapers
#LIST="$HOME/.config/wallpaper-list"
wallpapers=($DIR/*)
#echo "${wallpapers[$number]}"
wall=${wallpapers[(( RANDOM % ${#wallpapers[@]} ))]}
feh --bg-scale "$wall"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment