1
0
Fork 0

Add sway/wofi/foot Wayland desktop stack with per-host toggle

New opt-in feature for x86_64 desktops: sway + wofi + foot + swaybg +
swaylock + swayidle + grim + slurp + waybar + wl-clipboard. mako on
arch, dunst on debian (mako isn't packaged for debian).

Files:
- .chezmoi.yaml.tmpl: added data.sway flag (true on miche/byte/kaiser,
  false on Pis). Override per host with ~/.config/chezmoi/features/sway
  or ~/.config/chezmoi/features/no-sway marker files.
- run_once_40-install-sway.sh.tmpl: installs packages if .sway=true,
  exits 0 otherwise. Sets up the marker file.
- dot_config/{sway,foot,wofi,waybar,mako}/: existing configs from miche.

Per-host toggle workflow:
  # On any box, enable sway:
  touch ~/.config/chezmoi/features/sway
  chezmoi apply

  # On a sway-enabled box, disable it:
  touch ~/.config/chezmoi/features/no-sway
  rm ~/.config/chezmoi/features/sway
  chezmoi apply

Currently sway packages are already installed on miche (existed before
this commit). Byte will get them via the new run_once_40 script.
Pis (rye, crouton) are unaffected — install script early-returns.
This commit is contained in:
Rain 2026-06-22 14:23:56 -04:00
parent fe73bbecba
commit 6bbaa8f2f5
21 changed files with 965 additions and 1 deletions

View file

@ -60,4 +60,22 @@ age:
data:
os_family: {{ $osFamily | quote }}
os_id: {{ .chezmoi.osRelease.id | quote }}
os_id: {{ .chezmoi.osRelease.id | quote }}
# Sway/Wayland desktop stack — enabled per host. Pis don't need it
# (headless); x86_64 desktops do. Override at runtime by creating
# `~/.config/chezmoi/features/sway` (force ON) or
# `~/.config/chezmoi/features/no-sway` (force OFF).
#
# To toggle for a new box: `touch ~/.config/chezmoi/features/sway`
# then `chezmoi apply`.
{{- $swayOverrideOn := stat (joinPath .chezmoi.homeDir ".config/chezmoi/features/sway") }}
{{- $swayOverrideOff := stat (joinPath .chezmoi.homeDir ".config/chezmoi/features/no-sway") }}
{{- if $swayOverrideOn }}
sway: true
{{- else if $swayOverrideOff }}
sway: false
{{- else }}
{{- $swayHosts := list "miche" "byte" "kaiser" }}
sway: {{ has .chezmoi.hostname $swayHosts }}
{{- end }}