From 89881a740d6d1dfa14502eedef59e5deca035ab8 Mon Sep 17 00:00:00 2001 From: rain Date: Mon, 22 Jun 2026 14:49:17 -0400 Subject: [PATCH] README: document the new sway_setup prompt-based flow --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 009c78e..b05c170 100644 --- a/README.md +++ b/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 + 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`): -- `data.sway: true` on hostnames matching `miche`, `byte`, `kaiser` (and any suffix like `byte-arch`) -- `data.sway: false` on every other host +**Bootstrap prompt:** when you run `chezmoi init` for the first time on a new box, you'll be asked: -**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 -# Force ON (e.g. you set up a new Pi with a screen): +# Enable sway after the fact: touch ~/.config/chezmoi/features/sway 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 rm -f ~/.config/chezmoi/features/sway 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: - 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) @@ -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). +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 ```bash