There are several tutorials in the wild that lets you set random wallpapers with Tasker. But most of the tutorials have a common drawback: you need to name the wallpaper files in a certain fashion (mostly with numbers). But this is a daunting task if you have a large collection of wallpapers. So I have devised a simple way for Tasker to cycle through available wallpapers and choose a random one. Here’s how you can ask Tasker to set random wallpapers.

  1. Create a new “Event” context and select “Display” from event category menu.
  2. Select “Display Off”. This means the tasks will be fired every time display is off.
  3. Next create a new task. Click the + button to add actions. Select “File” from list of actions.
  4. Select “List Files”
  5. Enter the location of the directory where the wallpapers are located. Mine is inside “wallz”.
  6. Scroll down in the same action to set the variable to “%wallsrc”. This way we list all files and put the sources inside %wallsrc variable.
  7. Next, create a new action by clicking the + icon. Select “Variables”. Next, select “Variable Set”. Here, set the name of the variable to %count and value to %wallsrc(#), which represents the total number of wallpapers inside the directory.
  8. Again, create a new action by clicking the plus icon. Select “Variable”, and then “Variable Randomize”. Set the name to %index and min to 1 and max to %count. With this we find a random number between 1 and the total number of wallpapers.
  9. For the final action, add a new action and choose “Display” and then, “Set Wallpaper”. Set the value of image to %wallpaper(%index).
  10. Exit Tasker. Done!

Every time you unlock your screen, you’d find a new wallpaper.

Looking for mobile wallpapers? Check out /r/iWallpaper

A very complicated simple person. Jack of all trades, master of a few. Loves to read books and well-written code. Fluently speaks several languages including JavaScript, PHP, Java, English, Bengali etc. Listens to loads of music everyday. PhD in mood-swing. Chess Grandmaster of disaster.

Leave a Reply

Your email address will not be published. Required fields are marked *