Skip to content

Instantly share code, notes, and snippets.

@IAmMoltony
Created May 3, 2024 13:34
Show Gist options
  • Save IAmMoltony/5c3d5bd79638f35889fd717f0c045634 to your computer and use it in GitHub Desktop.
Save IAmMoltony/5c3d5bd79638f35889fd717f0c045634 to your computer and use it in GitHub Desktop.
systemd timer that changes wallpaper every 15 minutes
[Unit]
Description=Change Wallpaper Service
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'DISPLAY=:0 XAUTHORITY=/home/YOUR_USERNAME/.Xauthority /usr/bin/feh --bg-fill --randomize "/WALLPAPER_FOLDER/$(ls /WALLPAPER_FOLDER/ | shuf -n 1)"'
[Unit]
Description=Change wallpaper every 15 minutes
[Timer]
OnCalendar=*:0/15
Unit=changewallpaper.service
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment