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

102
dot_config/waybar/config Normal file
View file

@ -0,0 +1,102 @@
{
"layer": "top",
"position": "top",
"height": 32,
"spacing": 0,
"modules-left": [
"sway/workspaces",
"sway/mode"
],
"modules-center": [
"clock",
"custom/caffeine"
],
"modules-right": [
"pulseaudio",
"battery",
"cpu",
"memory",
"tray",
"network"
],
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}",
"format-icons": {
"focused": "\u25cf",
"default": "\u25cb"
}
},
"clock": {
"format": " {:%a %b %d %H:%M}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": " {:%Y-%m-%d}"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "\udb81\udd81 muted",
"format-icons": {
"default": [
"\udb81\udd7f",
"\udb81\udd80",
"\udb81\udd7e"
]
},
"scroll-step": 5,
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-click-right": "pavucontrol"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": "\udb80\udc84 {capacity}%",
"format-plugged": "\udb80\udc84 {capacity}%",
"format-icons": [
"\udb80\udc8e",
"\udb80\udc7a",
"\udb80\udc7b",
"\udb80\udc7c",
"\udb80\udc7d",
"\udb80\udc7e",
"\udb80\udc7f",
"\udb80\udc80",
"\udb80\udc81",
"\udb80\udc82",
"\udb80\udc79"
]
},
"cpu": {
"format": "\udb83\udee0 {usage}%",
"tooltip": true
},
"memory": {
"format": "\udb80\udf5b {}%",
"tooltip-format": "{used:0.1f}G / {total:0.1f}G"
},
"network": {
"format-wifi": "\udb82\udd28 {essid}",
"format-ethernet": "\udb80\ude00 {ipaddr}",
"format-disconnected": "\udb82\udd2d disconnected",
"format-linked": "\udb82\udd2a {ifname}",
"tooltip-format": "{ifname} \u2014 {ipaddr}",
"on-click": "$HOME/.config/sway/wifi-menu.sh"
},
"custom/caffeine": {
"format": "{icon}",
"format-icons": {
"default": "\udb80\udd76",
"active": "\u2615"
},
"exec": "if [ -f /tmp/caffeine-inhibit ]; then echo '{\"alt\":\"active\",\"text\":\"caffeine\"}'; else echo '{\"alt\":\"default\",\"text\":\"caffeine\"}'; fi",
"exec-interval": 2,
"return-type": "json",
"on-click": "$HOME/.config/sway/caffeine.sh"
},
"tray": {
"spacing": 8
}
}