Automatically change your wallpaper using cron
In my voidlinux I have installed:
sudo xbps-install -Sy cronie
And then I have started the service:
doas ln -s /etc/sv/crond /var/service/
NOTE: opendoas is an option for those who does not like sudo :)
My crontab:
NOTE: We need to take care of the variables, specially DISPLAY, XAUTHORITY and DBUS_SESSION_BUS_ADDRESS.
SHELL=/usr/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
MAILTO=""
DISPLAY=:0
XAUTHORITY=/home/sergio/.Xauthority
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
# for debugging
# * * * * * /usr/bin/wal -qi "/home/sergio/img/backgrounds" >> /tmp/wal_cron.log 2>&1
# change at 5 minute interval
*/5 * * * * /usr/bin/wal -qi "/home/sergio/img/backgrounds" >/dev/null 2>&1
Drink watter reminder with cron
I have found this article teaching us how to use cron to remind us of drinking watter.
Top comments (0)