From 9c955e5d66ff6c028b690371f5e0077a91e36fef Mon Sep 17 00:00:00 2001 From: Albert Armea Date: Sun, 4 Jan 2026 21:05:08 -0500 Subject: [PATCH] Make sway log out on config failure If you don't, it becomes impossible to reconfigure without restarting the machine completely --- sway.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway.conf b/sway.conf index 9a2fac8..de67a74 100644 --- a/sway.conf +++ b/sway.conf @@ -145,7 +145,8 @@ 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 +# 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 # Start the shepherd-hud (time remaining overlay)