README: document the new sway_setup prompt-based flow
This commit is contained in:
parent
a9ba9af8db
commit
89881a740d
1 changed files with 17 additions and 7 deletions
24
README.md
24
README.md
|
|
@ -89,24 +89,32 @@ If you skip this step, the omp config files will still land (they're not encrypt
|
||||||
|
|
||||||
## Sway / Wayland desktop stack
|
## Sway / Wayland desktop stack
|
||||||
|
|
||||||
Sway + wofi + foot + waybar + swaybg/lock/idle + grim/slurp + wl-clipboard is opt-in per host. Pis don't get it (headless); x86_64 desktops do automatically.
|
Sway + wofi + foot + waybar + swaybg/lock/idle + grim/slurp + wl-clipboard is opt-in at bootstrap time. The user decides per-box.
|
||||||
|
|
||||||
**Default behavior** (set in `.chezmoi.yaml.tmpl`):
|
**Bootstrap prompt:** when you run `chezmoi init` for the first time on a new box, you'll be asked:
|
||||||
- `data.sway: true` on hostnames matching `miche`, `byte`, `kaiser` (and any suffix like `byte-arch`)
|
|
||||||
- `data.sway: false` on every other host
|
|
||||||
|
|
||||||
**Manual override** (per box, takes precedence over hostname rule):
|
```
|
||||||
|
sway_setup (default false)? [y/N]
|
||||||
|
```
|
||||||
|
|
||||||
|
Answer `y` to install the packages + write the configs. Answer `N` (or just press enter) to skip. The answer is captured in `data.sway_setup` in the rendered `~/.config/chezmoi/chezmoi.yaml` and never re-asked.
|
||||||
|
|
||||||
|
**Subsequent flips** (per box, takes precedence over the bootstrap answer):
|
||||||
```bash
|
```bash
|
||||||
# Force ON (e.g. you set up a new Pi with a screen):
|
# Enable sway after the fact:
|
||||||
touch ~/.config/chezmoi/features/sway
|
touch ~/.config/chezmoi/features/sway
|
||||||
chezmoi apply
|
chezmoi apply
|
||||||
|
|
||||||
# Force OFF (e.g. running a desktop headless as a server):
|
# Disable sway (e.g. running a desktop headless as a server):
|
||||||
touch ~/.config/chezmoi/features/no-sway
|
touch ~/.config/chezmoi/features/no-sway
|
||||||
rm -f ~/.config/chezmoi/features/sway
|
rm -f ~/.config/chezmoi/features/sway
|
||||||
chezmoi apply
|
chezmoi apply
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Migration from hostname-allowlist:** the previous design auto-enabled sway on hostnames matching `miche`/`byte`/`kaiser`. That was removed. Existing desktops that already had sway installed kept the `~/.config/chezmoi/features/sway` marker, which now serves as the override-on signal — so they still have `sway_setup: true` without re-prompting.
|
||||||
|
|
||||||
|
**Migration of `chezmoi.yaml`:** if you ran the new template via SSH (no TTY), the prompt fails with "could not open a new TTY". Run it interactively (`chezmoi init`) from a real terminal, OR pass `--promptBool sway_setup=true|false` to set the value without prompting.
|
||||||
|
|
||||||
The `run_once_40-install-sway.sh` script:
|
The `run_once_40-install-sway.sh` script:
|
||||||
- exits 0 with no side effects on non-sway boxes
|
- exits 0 with no side effects on non-sway boxes
|
||||||
- installs `sway wofi foot swaybg swaylock swayidle grim slurp waybar wl-clipboard` via `pacman` (arch) or `apt` (debian)
|
- installs `sway wofi foot swaybg swaylock swayidle grim slurp waybar wl-clipboard` via `pacman` (arch) or `apt` (debian)
|
||||||
|
|
@ -115,6 +123,8 @@ The `run_once_40-install-sway.sh` script:
|
||||||
|
|
||||||
The configs in `dot_config/{sway,foot,wofi,waybar,mako}/` are placed unconditionally — they're harmless on Pis (no tools to read them).
|
The configs in `dot_config/{sway,foot,wofi,waybar,mako}/` are placed unconditionally — they're harmless on Pis (no tools to read them).
|
||||||
|
|
||||||
|
Sway is NOT auto-launched. It's installed as a tool you run manually from a TTY (`sway` from TTY1) for light desktops. The install and configs sit ready; launching is your call.
|
||||||
|
|
||||||
## Editing dotfiles
|
## Editing dotfiles
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue