Skip to content

Instantly share code, notes, and snippets.

@jleedev
Forked from tensorpudding/wallrotate.rb
Created February 9, 2010 08:39
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 jleedev/299026 to your computer and use it in GitHub Desktop.
Save jleedev/299026 to your computer and use it in GitHub Desktop.
Wallpaper rotation script
#!/usr/bin/env ruby
srand
command = ["/usr/bin/feh","--bg-scale"]
dir = ARGV[0] || "/home/michael/wall/default/"
choice = Dir[dir + "*.{jpg,png,jpeg}"].choice
system *([command] + [choice]) unless choice.empty?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment