Awesome Open Source
Awesome Open Source

A simple bash script to set wallpapers according to current time, using cron job scheduler.



  • 25+(more) different types of wallpaper set (HD/UHD/4K/5K).
  • Added pywal support.
  • Users can add their own wallpapers.
  • With Cron, Wallpaper changes according to time, throughout the day.
  • Tested on :
    • Window Managers : Openbox, i3wm, bspwm, awesomewm, Fluxbox, Fvwm, Swaywm
    • Desktop Environments : KDE, Pantheon, Gnome, Deepin, Cinnamon, XFCE, LXDE, MATE


Install Following programs on your system before using dwall -

  • feh : To set wallpapers on WMs
  • cron : To set a job for dwall
  • xrandr : Only if you're using XFCE desktop
  • pywal : for pywal support (optional)

Install feh, cron and xrandr -

# On Archlinux
$ sudo pacman -Sy xorg-xrandr feh cronie

# On Ubuntu or Debian
$ sudo apt-get install x11-xserver-utils feh cron

For swaywm support users must install oguri. The oguri daemon must be started for the script to work. Oguri can be installed on Arch linux via AUR.


Follow the step below to install dwall on your system -

You can run to test it before installing it on your system.

  • Clone this repository -
$ git clone
  • Change to cloned directory and run -
$ cd dynamic-wallpaper
$ chmod +x
$ ./

Run the program

  • Open the terminal and execute dwall -
$ dwall

╺┳┓╻ ╻┏┓╻┏━┓┏┳┓╻┏━╸   ╻ ╻┏━┓╻  ╻  ┏━┓┏━┓┏━┓┏━╸┏━┓
 ┃┃┗┳┛┃┗┫┣━┫┃┃┃┃┃     ┃╻┃┣━┫┃  ┃  ┣━┛┣━┫┣━┛┣╸ ┣┳┛
╺┻┛ ╹ ╹ ╹╹ ╹╹ ╹╹┗━╸   ┗┻┛╹ ╹┗━╸┗━╸╹  ╹ ╹╹  ┗━╸╹┗╸

Dwall V2.0   : Set wallpapers according to current time.
Developed By : Aditya Shakya (@adi1090x)

Usage : [-h] [-p] [-s style]

   -h	  Show this help message
   -p	  Use pywal to set wallpaper
   -s	  Name of the style to apply
Available styles:  aurora  beach  bitday  chihuahuan  cliffs  colony  desert  earth  exodus
factory  firewatch  forest  gradient  home  island  lake  lakeside  market  mojave  moon
mountains  room  sahara  street  tokyo  

Examples: -s beach       Set wallpaper from 'beach' style -p -s sahara   Set wallpaper from 'sahara' style using pywal
  • Select the style you like and run -
$ dwall -s firewatch
[*] Using style : firewatch

Setup cron job

This program is specifically created to use with a time-based job scheduler such as cron or systemd/Timers. So, After installing this program you need to set up a cron job using crontab on your system. Follow the step below to set a job for this program -

I'm using cronie on Arch Linux here.

  • After installing cron, enable and start the cron service -
# On Arch Linux
$ sudo systemctl enable cronie.service --now
  • Make sure the service is enabled and running -
$ systemctl status cronie.service
● cronie.service - Periodic Command Scheduler
     Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-12-26 14:39:31 IST; 5h 22min ago
   Main PID: 779 (crond)
  • Cron does not run under the Xorg server therefore it cannot know the environmental variable necessary to be able to start an Xorg server application so they will have to be defined. Find out the values of following environment variables - SHELL, PATH, DISPLAY, DESKTOP_SESSION, DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME_DIR

/usr/bin/zsh | /usr/local/bin:/usr/bin | :0 | Openbox | unix:path=/run/user/1000/bus | /run/user/1000
  • Now, Create an hourly cron job for dwall using crontab -
# export editor for crontab
$ export EDITOR=vim

# Edit your crontab and add a job
$ crontab -e

# Add this line replacing the values of env variable and style with yours
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s firewatch

# check if job is created on your crontab
$ crontab -l
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s firewatch
  • That's it, dwall added to your crontab and will change the wallpaper every hour. If you want to change the wallpaper style, just remove previous job and add new with another style.
# delete previous job
$ crontab -r

# Add new job with different style
$ crontab -e
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s bitday

How to add own wallpapers

  • Download a wallpaper set you like.
  • Rename the wallpapers (must be jpg/png) to 0-23. If you don't have enough images, symlink them.
  • Make a directory in /usr/share/dynamic-wallpaper/images and copy your wallpapers in that.
  • Run the program, select the style and apply it.


  • You can use dwall to change between your favorite wallpapers every hour.
  • You can use dwall as picture slide, which can set your favorite photos as wallpaper every hour or every 15 minutes. Just create an appropriate cron job.

Use HEIC Images

You may also want to use wallpapers from Dynamic Wallpaper Club. To do so, you need to convert .heic image file to either png or jpg format. Download a .heic wallpaper file you like and follow the steps below to convert images.

  • First install heif-convert on your system -
# On Archlinux
$ sudo pacman -Sy libheif

# On Ubuntu or Debian
$ sudo apt-get install libheif-examples

  • Move you .heic file in a directory and run following command to convert images -
# change to directory
$ cd Downloads/heic_images

# convert to jpg images
$ for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done
  • Now, you have the images, just follow the above steps to use these wallpapers with dwall.

More Wallpapers : I've also created a few more wallpaper sets, which are not added to this repository because of their big size. You can download these wallpapers set from here -


Available Sets : Catalina, London, Maldives, Mojave HD, Mount Fuji, Seoul, and more...


Aurora Beach Bitday Chihuahuan
gif gif gif gif
Cliffs Colony Desert Earth
gif gif gif gif
Exodus Factory Forest Gradient
gif gif gif gif
Home Island Lake Lakeside
gif gif gif gif
Market Mojave Moon Mountains
gif gif gif gif
Room Sahara Street Tokyo
gif gif gif gif

Common Issues

1. Wallpaper not changing : If your wallpaper is not changing, then open an issue and show me the output of echo $DESKTOP_SESSION.

2. Not working on XFCE : If this script is not working on xfce, then open the terminal and run xfconf-query -c xfce4-desktop -m and change the wallpaper (any) via xfce4-settings-manager.
In the terminal, xfconf-query will print lines starting with set:, which show which properties have been changed, check screen & monitor values and modify the script accordingly.

109   ## For XFCE
110   if [[ "$OSTYPE" == "linux"* ]]; then
111      SCREEN="0"
112      MONITOR="1"
113   fi

Quick FYI

  • In KDE, dwall changes the wallpaper in all the Activities.
  • While using with pywal, the color of other applications (Terminal, polybar, rofi, etc) will change the way you configured these application. It's on you.
  • You can add dwall -s style & to your WM's autostart file to set/restore wallpaper after login/reboot.
  • You can also create a @reboot crontab to set appropriate wallpaper on boot.
Alternatives To Dynamic Wallpaper
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Shell (182,829
Bash (19,228
Cron (5,638
Bash Script (4,092
Wallpaper (2,676
Crontab (2,469
Cronjob (1,699
Xorg (701
Job Scheduler (416
Unixporn (200
Wallpaper Engine (64
Live Wallpaper (51
Pywal (49
Archcraft (21
Dynamic Wallpaper (20
Wallpaper Manager (19
Adi1090x (16