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
24
dot_config/sway/caffeine.sh
Executable file
24
dot_config/sway/caffeine.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# caffeine.sh — toggle caffeine mode by killing/restarting swayidle
|
||||
# When ON: kill swayidle (no idle lock/screen-off)
|
||||
# When OFF: restart swayidle with normal timeouts
|
||||
|
||||
WALLPAPER="$HOME/.local/share/wallpapers/teach-invaders-gruvbox.png"
|
||||
FLAG="/tmp/caffeine-inhibit"
|
||||
|
||||
if [ -f "$FLAG" ]; then
|
||||
# Turn OFF caffeine — restart swayidle
|
||||
rm -f "$FLAG"
|
||||
killall swayidle 2>/dev/null
|
||||
swayidle -w \
|
||||
timeout 300 "swaylock -f -i $WALLPAPER" \
|
||||
timeout 600 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
before-sleep "swaylock -f -i $WALLPAPER" &
|
||||
notify-send -t 2000 "☕ Caffeine OFF" "Idle sleep enabled" 2>/dev/null
|
||||
else
|
||||
# Turn ON caffeine — kill swayidle
|
||||
touch "$FLAG"
|
||||
killall swayidle 2>/dev/null
|
||||
notify-send -t 2000 "☕ Caffeine ON" "Idle sleep disabled" 2>/dev/null
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue