Warning Some additional configuration maybe required
1. Clone the repository.
Note I personally create a folder in my home directory (called SystemFiles) and clone the repository there.
cd
mkdir SystemFiles
cd SystemFiles/
git clone https://github.com/SMark5/config.git --recurse-submodules
cd config2. Setup cron job.
Note In order to use this script you need to setup a cron job
1. First intall cron
2. After installing cron, enable and start the cron service
- Systemd users (most people linux mint, ubuntu, debian, arch etc.)
sudo systemctl enable cronie.service --now- Openrc users https://wiki.gentoo.org/wiki/Cron
Note Install what you like (I personaly use dcron)
doas rc-update add dcron defaultNote Install what you like
doas ln -s /etc/sv/<service-name> /var/service/- Other init system users (I think you get the point)
3. Make a cron job.
Note you need to add the following enviroment variables
echo "$WAYLAND_DISPLAY | $DISPLAY | $XDG_RUNTIME_DIR"
#my output
wayland-1 | :0 | /run/user/1000crontab -e
# Add this line replacing the values of env variable and style with yours
0 * * * * WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 $HOME/SystemFiles/dynamic-wallpaper-wayland/wallpaper.shWarning Don't forget to change $HOME/SystemFiles if you placed it somewhere else
4. Change script variables.
Note optional
- Open the wallpaper.sh file with your favorite text editor
#change the DIR variable accordingly where you want to place it
DIR="$HOME/SystemFiles/dynamic-wallpaper/images/firewatch/- you can use it with xorg just change the comments
#!/bin/sh
## Author : SMark5
#Inspired by adi1090x/dynamic-wallpaper
## Dynamic Wallpaper : Set wallpapers according to current time.
## Created to work better with job schedulers (cron)
#change the DIR variable accordingly where you want to place it
DIR="$HOME/SystemFiles/dynamic-wallpaper/images/firewatch/"
HOUR=`date +%k`
FORMAT=".png"
#wayland
#set background
#swaybg -o \* -i $DIR$HOUR.png -m fill
#sleep 1
# kill all older processes of swaybg
#kill $(ps -eo pid,etime,comm | grep 'swaybg' | awk '{ print $1 }' | head -n -1)
#xorg
#if you want to use xorg just uncomment the line bellow
#and comment the wayland lines above
feh --bg-fill $DIR$HOUR.png- 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 directory to $HOME/SystemFiles/dynamic-wallpaper/images/
- Rename DIR variable to DIR="$HOME/SystemFiles/dynamic-wallpaper/images/yourWallpaperDirName
- Dynamic-wallpaper: adi1090x/dynamic-wallpaper
- Readme: Sigmanificient/dotfiles