refactor(#107): theme-state.json → state.json, theme-sync → state-sync
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
The machine flake's git-tracked settings file is system state, not "theme" only — rename it to state.json. CLI becomes nomarchy-state-sync with a nomarchy-theme-sync symlink for scripts and muscle memory. Eval (mkFlake, doctor, lifecycle) still accepts theme-state.json; the next write migrates to state.json and removes the legacy file. Documented in MIGRATION.md; drop the CLI alias after release notes.
This commit is contained in:
@@ -9,16 +9,16 @@ rule of thumb:
|
||||
|
||||
## 1. Appearance (gaps, colors, rounding, fonts, opacity) — use the CLI
|
||||
|
||||
Everything that defines the *look* flows from `theme-state.json`, the single
|
||||
source of truth. Change it with `nomarchy-theme-sync`, which writes the JSON
|
||||
Everything that defines the *look* flows from `state.json`, the single
|
||||
source of truth. Change it with `nomarchy-state-sync`, which writes the JSON
|
||||
and rebuilds — one generation, applied to Hyprland, Waybar, Kitty, btop and
|
||||
Stylix at once:
|
||||
|
||||
```sh
|
||||
nomarchy-theme-sync set ui.gapsOut 16 # gaps, borders, rounding, opacity
|
||||
nomarchy-theme-sync set ui.rounding 0
|
||||
nomarchy-theme-sync set fonts.mono "FiraCode Nerd Font"
|
||||
nomarchy-theme-sync apply gruvbox # whole palette
|
||||
nomarchy-state-sync set ui.gapsOut 16 # gaps, borders, rounding, opacity
|
||||
nomarchy-state-sync set ui.rounding 0
|
||||
nomarchy-state-sync set fonts.mono "FiraCode Nerd Font"
|
||||
nomarchy-state-sync apply gruvbox # whole palette
|
||||
```
|
||||
|
||||
### Icon pack
|
||||
@@ -28,7 +28,7 @@ icon pack shipped by default (Papirus alone is ~1 GiB, so extra packs are
|
||||
opt-in rather than a cost every install pays). To switch to another pack:
|
||||
|
||||
```sh
|
||||
nomarchy-theme-sync set icons "Tela-dark" # or "" to return to Papirus-by-mode
|
||||
nomarchy-state-sync set icons "Tela-dark" # or "" to return to Papirus-by-mode
|
||||
```
|
||||
|
||||
Only the pack you name is pulled into your system (the first switch downloads
|
||||
@@ -55,11 +55,11 @@ 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
|
||||
nomarchy-state-sync set settings.autoTheme.day summer-day --no-switch
|
||||
nomarchy-state-sync set settings.autoTheme.night summer-night --no-switch
|
||||
nomarchy-state-sync set settings.autoTheme.sunset 20:00 --no-switch
|
||||
nomarchy-state-sync set settings.autoTheme.enable true --no-switch
|
||||
nomarchy-state-sync auto --force # one rebuild: installs the timer + applies now
|
||||
```
|
||||
|
||||
State lives in `settings.autoTheme`:
|
||||
@@ -67,14 +67,14 @@ 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`) |
|
||||
| `day` / `night` | theme slugs — e.g. `summer-day` / `summer-night` (see `nomarchy-state-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`.
|
||||
without switching with `nomarchy-state-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`
|
||||
@@ -197,7 +197,7 @@ value is theme-owned at normal priority — either change it via the CLI (§1) o
|
||||
|
||||
| You want to… | Do this |
|
||||
|---|---|
|
||||
| Change gaps / colors / rounding / fonts | `nomarchy-theme-sync set …` or `apply` |
|
||||
| Change gaps / colors / rounding / fonts | `nomarchy-state-sync set …` or `apply` |
|
||||
| Change input / misc / monitor / animations / terminal chrome | plain assignment in `home.nix` |
|
||||
| Arrange monitors declaratively | `nomarchy.monitors` (values via `nwg-displays`) |
|
||||
| Add keybinds / autostarts | add to the `bind` / `exec-once` list (concatenates) |
|
||||
|
||||
Reference in New Issue
Block a user