Make Sway/systemd call shepherdd's graceful shutdown on logout

This commit is contained in:
Albert Armea 2026-01-01 22:04:38 -05:00
parent 5c6f50b673
commit 66cfcce29d

View file

@ -44,8 +44,11 @@ input type:pointer {
# Add this to kernel parameters: vt.handoff=0
# Or in /etc/systemd/logind.conf: NAutoVTs=0 and ReserveVT=0
# Emergency exit for admin (Super+Shift+Escape) - REMOVE IN PRODUCTION
bindsym Mod4+Shift+Escape exit
# Exit keybinding - works for both nested sway (dev) and production logout
# Kill shepherdd first to ensure clean shutdown, then exit sway
# In dev: exits the nested sway instance
# In production: logs out of the session (REMOVE or change to something harder to press)
bindsym Mod4+Shift+Escape exec pkill -TERM shepherdd && swaymsg exit
### Window rules for kiosk behavior
@ -134,6 +137,7 @@ workspace 1 output *
# Start shepherdd FIRST - it needs to create the socket before HUD/launcher connect
# Running inside sway ensures all spawned processes use the nested compositor
# Shepherdd handles SIGHUP for graceful shutdown when sway exits
exec ./target/debug/shepherdd -c ./config.example.toml
# Give shepherdd a moment to initialize, then start UI components