Simple bash
script to set a Dynamic Wallpaper according to certain conditions (currently TIME
).
Follow the steps below (You can run test.sh
to test it before installing it on your system) -
- Install feh, xrandr(for xfce only)
# On Archlinux
sudo pacman -Sy xorg-xrandr feh
# On Ubuntu or Debian
sudo apt-get install x11-xserver-utils feh
-
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. -
Clone this repository and...
cd $HOME
git clone https://github.com/adi1090x/dynamic-wallpaper.git
cd dynamic-wallpaper
chmod +x install.sh
./install.sh
- Run the program and choose an option
$ dwall
Dynamic Wallpaper V1.0
Simple program to set a dynamic desktop background based on current time.
Developed By - Aditya Shakya (@adi1090x)
usage: ./test.sh [-s] style [-o] style [-h]
-s style name of theme/style.
-o style Run once and exit, useful for schedulers (cron).
-h help show this usage/help message.
Styles Dir: /home/aditya/adi1090x/dynamic-wallpaper/images
Available styles/themes: bitday exodus firewatch firewatch2 firewatch3 forest home
maldives mall mojave moon room seoul street street2 surface tokyostreet
- Dynamic style selection.
- User can add their own wallpapers.
- 17+ different types of wallpaper set (HD, UHD).
- (Currently) Change according to time, throughout the day.
- Tested on - WM: Openbox, i3wm, bspwm, awesomewm, Fluxbox, Fvwm, Swaywm & DE: KDE(neon), Pantheon, Gnome(ubuntu, pop_os), Deepin, Cinnamon, XFCE, LXDE, MATE.
- Download a wallpaper set you like.
- Make a dir in
/usr/share/dynamic-wallpaper/images
- Rename your images(must be jpg/png) to
0-23
. If you don't have enough images, symlink them. - Run the program and apply it.
More Wallpapers : To not make repo big in size, I've put large wallpapers set to another place & also not everyone wants all the wallpapers. You can download these wallpapers set from here -
Sets : catalina, london, mojaveHD, mountfuji, surface
Bit Day | Exodus | Firewatch | Firewatch Alt |
---|---|---|---|
Forest | Home | Maldives | Mall |
---|---|---|---|
Mojave | Moon | Room | Seoul |
---|---|---|---|
Street | Street Alt | Surface | Tokyo Streets |
---|---|---|---|
-
Wallpaper not changing : If your wallpaper is not changing, then open an issue and show me the output of
echo $DESKTOP_SESSION
. -
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 terminal, xfconf-query will print lines starting withset:
, which show which properties have been changed, checkscreen
&monitor
values and modify the script accordingly.
53 ## For XFCE
54 if [[ "$OSTYPE" == "linux"* ]]; then
55 SCREEN="0"
56 MONITOR="1"
57 fi
- Autostart : If you want to autostart the script with desktop, you can add it to your WM autostart file & if doesn't work for you, you can create a
desktop file
in$HOME/.config/autostart
dir.
$ cd $HOME/.config/autostart && touch dwall.desktop
# Add this to dwall.desktop file
[Desktop Entry]
Name=Dynamic Wallpaper
Comment=Simple script, shows a Dynamic Wallpaper based on TIME.
Exec=/usr/bin/dwall -s firewatch &
Type=Application
Icon=wallpaper
Categories=Accessories;
- Cronjob : If you want to run it with cron, you may need to define these environment variables,
- SHELL
- DISPLAY
- DESKTOP_SESSION
- XDG_RUNTIME_DIR
- XDG_DATA_DIRS
- DBUS_SESSION_BUS_ADDRESS
You can find what values your environment has by typing
env
in your terminal or check each variable viaecho $VARIABLE_NAME
.
- In KDE, it changes the wallpaper in all the Activities.
- If you can improve it, you're welcome.
- You can add dwall -s style & to your wm autostart file to set it as wallpaper after login.
- Have Fun!