Join me.
Thanks for coming here, I hope you are enjoying learning here, I have also written some books in case you want to learn a bit more :)
If you need my help with Drupal, Linux, Jira, Scripting, Automation or want to contact me then raise a ticket for me please :) and I will get back to you, promise. At Sparxsys we provide Atlassian consultancy services, reach out to me at ravi at sparxsys dot com

Random Wallpaper Shell Script

A simple shell script that I use to find a random image from a directory and change the wallpaper.

  1. #! /bin/bash
  2.  
  3. files=(~/pics/wallpaper/*)
  4.  
  5. randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
  6. echo $randomfile
  7.  
  8. xwallpaper --stretch $randomfile

Enjoy.

Similar posts

Ravi Sagar Newsletter

Honestly I hardly send out mails but I guess there is no harm in at least having a newsletter. I will only send newsletter when I have something important to share or an update. People are busy and no one has time to read emails these days. If you really like my content then I guess you will remember my site and come back for more.

Want to contact me?