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:
parent
fe73bbecba
commit
6bbaa8f2f5
21 changed files with 965 additions and 1 deletions
25
dot_config/foot/patch.py
Normal file
25
dot_config/foot/patch.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from pathlib import Path
|
||||
p = Path("/home/rain/.config/foot/foot.ini")
|
||||
text = p.read_text()
|
||||
old_lines = [
|
||||
"# foot does not expand env variables in the `shell=` value, so we have to",
|
||||
"# go through `sh -c` to make the parent's $SHELL take effect. When foot",
|
||||
"# is launched from a fish session, $SHELL is /bin/fish, and foot runs fish.",
|
||||
"# When launched from bash, $SHELL is /bin/bash, and foot runs bash. The",
|
||||
"# default fallback is /bin/bash if $SHELL is unset for any reason.",
|
||||
'shell=sh,-c,"exec ${SHELL:-/bin/bash} -i"',
|
||||
]
|
||||
new_lines = [
|
||||
"# kaiser runs zsh as the login shell. Hardcode /usr/bin/zsh here.",
|
||||
"# foot does NOT expand $SHELL in shell= (it passes the literal string",
|
||||
"# to its child process), so the sh,-c trick makes foot try to exec a",
|
||||
'# binary literally named "${SHELL:-/bin/bash}" and die with',
|
||||
'# "No such file or directory". Point shell= at the binary directly.',
|
||||
"shell=/usr/bin/zsh",
|
||||
]
|
||||
old = "\n".join(old_lines)
|
||||
new = "\n".join(new_lines)
|
||||
assert old in text, "old block not found in foot.ini"
|
||||
text = text.replace(old, new, 1)
|
||||
p.write_text(text)
|
||||
print("OK, new size:", len(text))
|
||||
Loading…
Add table
Add a link
Reference in a new issue