From dcddaf0f79d30cd4d581f5c7babfcc40a7a9cc46 Mon Sep 17 00:00:00 2001 From: Lucas Vivo Date: Tue, 17 Nov 2026 13:14:10 +0100 Subject: [PATCH] chore(wallpaper_changer): add wallpaper_changer service file --- wallpaper_changer/README.md | 22 +++++++++++++++++++ .../systemd/wallpaper-changer.service | 14 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 wallpaper_changer/systemd/wallpaper-changer.service diff --git a/wallpaper_changer/README.md b/wallpaper_changer/README.md index 1d3758f..f82e945 100644 --- a/wallpaper_changer/README.md +++ b/wallpaper_changer/README.md @@ -6,6 +6,28 @@ Select a folder mode with `--mode default|x|i` (shortcuts `-d`, `-x`, and `-i`); Use `--disable-encryption` to build a wallpaper from a folder without encrypting files or decrypting images or the naming table. Encrypted image payloads are skipped; `.jpg_enc` files are included only when they contain plain JPEG data. +### Run as a GNOME user service + +The systemd user unit runs the daemon in the graphical session, which is required by GNOME's `gsettings`. It assumes the project is checked out at `~/scripts/wallpaper_changer` and uses that checkout's `.venv`; adjust `ExecStart` and `WorkingDirectory` in `systemd/wallpaper-changer.service` if yours is elsewhere. The unit changes the wallpaper every 60 minutes by default; edit `--minutes` to change the interval. + +Install and start it with: + +```sh +mkdir -p ~/.config/systemd/user +cp systemd/wallpaper-changer.service ~/.config/systemd/user/ +systemctl --user daemon-reload +systemctl --user enable --now wallpaper-changer.service +``` + +Check its status or follow its logs: + +```sh +systemctl --user status wallpaper-changer.service +journalctl --user -u wallpaper-changer.service -f +``` + +Stop and disable it with `systemctl --user disable --now wallpaper-changer.service`. + Encrypt or decrypt the fixed naming-table files in the selected image folder: ```sh diff --git a/wallpaper_changer/systemd/wallpaper-changer.service b/wallpaper_changer/systemd/wallpaper-changer.service new file mode 100644 index 0000000..e26e037 --- /dev/null +++ b/wallpaper_changer/systemd/wallpaper-changer.service @@ -0,0 +1,14 @@ +[Unit] +Description=Wallpaper Changer +After=graphical-session.target +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=%h/tools/wallpaper_changer --daemon --minutes 5 -c +Icon=/home/lucas/scripts/desktop_apps/wallpaper.png +Restart=on-failure +RestartSec=30s + +[Install] +WantedBy=graphical-session.target