A simple GNOME desktop wallpaper rotation using Systemd.
Go to file
Adam 605dd390c0 docs: change project name 2022-04-10 14:50:17 -06:00
.config/systemd/user refactor: change project name 2022-04-10 14:07:15 -06:00
etc/systemd/user refactor: change project name 2022-04-10 14:07:15 -06:00
usr/local/bin feat: validate desktop environment 2022-04-10 14:30:00 -06:00
readme.md docs: change project name 2022-04-10 14:50:17 -06:00
screen_shield.md Initial commit 2021-05-13 15:46:12 -06:00

readme.md

Wallpaperctl

  • Note: Adjust paths as applicable to the desired OS.
  • Note: The "$" represents the terminal prompt.
  • Note: Verified to work on Arch Linux with Gnome v3.14 to v42.

Installation Instructions

  1. Download "wallpaperctl.service", "wallpaperctl.timer" and "gnome_rotate_wallpaper".
  2. Move the 3 files to where Systemd user files are stored.
$ mv wallpaperctl.service wallpaperctl.timer /etc/systemd/user/
  1. Move the BASH script "gnome_rotate_wallpaper".
$ mv gnome_rotate_wallpaper /usr/local/bin/
  1. Set execute permissions.
$ chmod +x /usr/local/bin/gnome_rotate_wallpaper
  1. Enable the timer.
$ systemctl --user enable wallpaperctl.timer
  1. Verify the timer is enabled.
$ systemctl --user list-unit-files
wallpaperctl.service disabled
wallpaperctl.timer   enabled
2 unit files listed.
  1. Start the timer.
$ systemctl --user start wallpaperctl.timer
  1. Verify the timer has been started.
$ systemctl --user list-timers
NEXT                         LEFT    LAST                        PASSED UNIT               ACTIVATES
Thu 2016-03-10 18:49:00 CST  1s left Thu 2016-03-10 18:48:56 CST 1s ago wallpaperctl.timer wallpaperctl.service
1 timers listed.
Pass --all to see loaded but inactive timers, too.

User Configuration

Change the default wallpaper directory.

  1. Create the required directories.
$ mkdir  ~/.config/systemd ~/.config/systemd/user
  1. Create the configuration file. Replace "username" with applicable value.
$ nano ~/.config/systemd/user/wallpaperctl.conf
WALLPAPER_DIR=/home/username/Pictures/wallpaper

Set the Interval to When the Wallpaper Changes.

Create the timer file and then change the "OnCalendar" value to the desired interval. Refer to ArchLinux: systemd/Timers for further details.

  1. Create the required directories.
$ mkdir  ~/.config/systemd ~/.config/systemd/user
  1. Create the configuration file.
$ nano ~/.config/systemd/user/wallpaperctl.timer
[Unit]
Description=Wallpaperctl - Systemd GNOME wallpaper changer

[Timer]
OnCalendar=*:0/1
Persistent=true
Unit=wallpaperctl.service

[Install]
WantedBy=wallpaperctl.service

Available picture-options

  • none
  • wallpaper
  • centered
  • scaled
  • stretched
  • zoom
  • spanned