1
0
Fork 0
gnu-plus-dotfiles/dot_config/sway
rain d78ba4152b sway: factor env restoration into restore-wayland-env.sh, fix caffeine notify
caffeine.sh click was working (icon toggled, swayidle restarted) but
the 'Caffeine ON/OFF' notification never appeared. Same root cause as
the prior swayidle bug: waybar's on-click context strips WAYLAND_DISPLAY
from the spawned script's env. notify-send writes to D-Bus (exit 0) but
mako can't display because it has no Wayland socket to render on. Click
appears to do nothing visually.

Fix: extract the /proc/*/environ probe into a shared helper
(restore-wayland-env.sh) and source it from both caffeine.sh AND
start-swayidle.sh. Now any future on-click script in this repo can
`. restore-wayland-env.sh` to inherit the right env.

Verified on tadbit:
- click 1 (caffeine ON): swayidle killed, flag set, 'Caffeine ON'
  notification appeared in mako
- click 2 (caffeine OFF): swayidle restarted, flag cleared, 'Caffeine
  OFF' notification appeared in mako

Both are visible in makoctl history now.
2026-06-23 22:18:01 -04:00
..
caffeine.sh sway: factor env restoration into restore-wayland-env.sh, fix caffeine notify 2026-06-23 22:18:01 -04:00
cheatsheet.md Add sway/wofi/foot Wayland desktop stack with per-host toggle 2026-06-22 14:23:56 -04:00
cheatsheet.sh Add sway/wofi/foot Wayland desktop stack with per-host toggle 2026-06-22 14:23:56 -04:00
config sway: extract start-swayidle.sh as single source of truth (fix caffeine) 2026-06-23 21:51:09 -04:00
lock-fancy.sh Add sway/wofi/foot Wayland desktop stack with per-host toggle 2026-06-22 14:23:56 -04:00
restore-wayland-env.sh sway: factor env restoration into restore-wayland-env.sh, fix caffeine notify 2026-06-23 22:18:01 -04:00
start-swayidle.sh sway: factor env restoration into restore-wayland-env.sh, fix caffeine notify 2026-06-23 22:18:01 -04:00
toggle-dropdown.sh Add sway/wofi/foot Wayland desktop stack with per-host toggle 2026-06-22 14:23:56 -04:00
wifi-menu.sh Add sway/wofi/foot Wayland desktop stack with per-host toggle 2026-06-22 14:23:56 -04:00