From 808990592decf273a5d93d01bcbe9e6f8a6ff166 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 10 Jul 2026 22:27:11 +0100 Subject: [PATCH] docs(overrides): user guide for auto day/night theme (#79) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an "Auto theme (day/night)" subsection to docs/OVERRIDES.md § 1 (Appearance), after the Icon pack section. Covers what it does (light/dark switch on a schedule, same one engine), how to turn it on (Look & Feel › Auto theme, or the shell set/auto sequence), the settings.autoTheme fields, and behavior (periodic ~15-min re-check, idempotent rebuilds, instant disable). Names/fields/flags verified against rofi.nix, nomarchy-theme-sync.py, and the icon section's style. Co-Authored-By: Claude Opus 4.8 --- docs/OVERRIDES.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/OVERRIDES.md b/docs/OVERRIDES.md index b4333d1..1dad260 100644 --- a/docs/OVERRIDES.md +++ b/docs/OVERRIDES.md @@ -47,6 +47,35 @@ switches (presets don't carry an icon field). To add a pack that isn't listed, append a row to `iconPacks` in `modules/home/theme.nix`. Set `icons` to `""` any time to drop back to Papirus with automatic Dark/Light. +### Auto theme (day/night) + +Switch automatically between a light **day** theme and a dark **night** theme +on a schedule — the same one engine as a manual `apply`, no second pipeline. +Turn it on from **Look & Feel › Auto theme** (`SUPER+M`): toggle it, pick the +day and night themes, and set the sunrise/sunset times. The same from a shell: + +```sh +nomarchy-theme-sync set settings.autoTheme.day summer-day --no-switch +nomarchy-theme-sync set settings.autoTheme.night summer-night --no-switch +nomarchy-theme-sync set settings.autoTheme.sunset 20:00 --no-switch +nomarchy-theme-sync set settings.autoTheme.enable true --no-switch +nomarchy-theme-sync auto --force # one rebuild: installs the timer + applies now +``` + +State lives in `settings.autoTheme`: + +| Field | Meaning | +|---|---| +| `enable` | on / off | +| `day` / `night` | theme slugs — e.g. `summer-day` / `summer-night` (see `nomarchy-theme-sync list`) | +| `sunrise` / `sunset` | switch times, `"HH:MM"` (24-hour) | + +A timer re-checks every ~15 minutes: the day theme applies around sunrise, the +night theme around sunset — but it only rebuilds when the active theme +actually needs to change, so most checks do nothing. Enabling rebuilds once +(to install the timer); disabling is instant. Preview the current decision +without switching with `nomarchy-theme-sync auto --which`. + These values are deliberately kept at normal priority in the modules, so they stay owned by the theme system. If you *insist* on pinning one in `home.nix` regardless of the active theme, use `lib.mkForce` (see §4) — but then the CLI