Make sway log out on config failure

If you don't, it becomes impossible to reconfigure without restarting the machine completely
This commit is contained in:
Albert Armea 2026-01-04 21:05:08 -05:00
parent 7abd61f09a
commit 9c955e5d66

View file

@ -145,7 +145,8 @@ workspace 1 output *
# Start shepherdd FIRST - it needs to create the socket before HUD/launcher connect # Start shepherdd FIRST - it needs to create the socket before HUD/launcher connect
# Running inside sway ensures all spawned processes use the nested compositor # Running inside sway ensures all spawned processes use the nested compositor
# Shepherdd handles SIGHUP for graceful shutdown when sway exits # Shepherdd handles SIGHUP for graceful shutdown when sway exits
exec ./target/debug/shepherdd -c ./config.example.toml # If shepherdd fails to start (e.g., config error), exit sway to prevent a broken state
exec sh -c './target/debug/shepherdd -c ./config.example.toml || swaymsg exit'
# Give shepherdd a moment to initialize, then start UI components # Give shepherdd a moment to initialize, then start UI components
# Start the shepherd-hud (time remaining overlay) # Start the shepherd-hud (time remaining overlay)