Wallpaper Changer CI / build (push) Successful in 44s
Wallpaper Changer CI / test-wallpaper-changer (push) Successful in 17s
Wallpaper Changer CI / lint-wallpaper-changer (push) Successful in 6s
Wallpaper Changer CI / install (quiethost) (push) Successful in 4s
Wallpaper Changer CI / install (vivohost) (push) Successful in 7s
63 lines
3.3 KiB
Markdown
63 lines
3.3 KiB
Markdown
Generated migration starter from WallpaperChanger.sh. Implements monitor detection, image scanning, openssl wrapper, naming table loader, wallpaper builder and GNOME setter.
|
|
|
|
For monitor detection, X11 sessions use `xrandr`, while GNOME Wayland sessions use
|
|
`gdbus` and Mutter's display configuration. `XDG_SESSION_TYPE` must identify the
|
|
session; Wayland also requires `XDG_CURRENT_DESKTOP` to include `GNOME`. X11
|
|
output names must correspond to the DRM connector names after converting
|
|
`HDMI-A-N` to `HDMI-N`. Headless mode does not require either command.
|
|
|
|
Display the installed package version with `wallpaperchanger --version` (or `-v`).
|
|
|
|
Select a folder mode with `--mode default|x|i` (shortcuts `-d`, `-x`, and `-i`); modes select the default `Desktop1920x1080`, `corrupt`, or `insta` folder. `--folder PATH` independently overrides the selected folder and accepts a relative name under the wallpaper directory or an absolute path. For example, `wallpaperchanger --mode x --folder custom` uses the `custom` folder.
|
|
|
|
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.
|
|
|
|
Encryption uses the passphrase in `~/.wallpaper/encryption.passphrase` and all
|
|
new data is encrypted with that value. Generate it once and share the same file
|
|
across hosts that access the same wallpaper repository:
|
|
|
|
```sh
|
|
openssl rand -base64 32 > ~/.wallpaper/encryption.passphrase
|
|
chmod 600 ~/.wallpaper/encryption.passphrase
|
|
```
|
|
|
|
Use `--passphrase-file PATH` to select another file. The legacy
|
|
PEM private key option and fallback are not supported.
|
|
|
|
The encrypted naming table is updated after each image is encrypted.
|
|
Plaintext images are removed only after the batch completes successfully.
|
|
|
|
### Run as a GNOME user service
|
|
|
|
The systemd user unit runs in the graphical session, which is required by GNOME's `gsettings`. It starts the launcher at `~/tools/wallpaper_changer`; the Python checkout now lives at `~/scripts/python/wallpaper_changer`. If you run directly from the checkout, update `ExecStart` in `systemd/wallpaper-changer.service` to use that checkout. 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`.
|
|
|
|
### CI tests
|
|
|
|
The Gitea workflow runs the Python test suite for pushes to `dev` and pull requests targeting `dev`. A push to `main` runs the test suite, then builds and deploys the executable and user service to the trusted Linux x64 self-hosted runner. Test and build dependencies are set up in CI; deployment is limited to pushes to `main`.
|
|
|
|
Encrypt or decrypt the fixed naming-table files in the selected image folder:
|
|
|
|
```sh
|
|
wallpaperchanger --encryptNT
|
|
wallpaperchanger --decryptNT
|
|
```
|
|
|
|
`--encryptNT` reads `naming_table.dec` and writes `naming_table_enc.txt`; `--decryptNT` reads `naming_table_enc.txt` and writes `naming_table.dec`. |