From 8b976ead1d2deae8c7bff4b99bdbbfacdbb9c70d Mon Sep 17 00:00:00 2001 From: Quinn Bushey Date: Thu, 11 Jun 2026 10:16:59 -0700 Subject: [PATCH 1/2] toggle: add spawnThenToggle client option Windows spawned via IPC (e.g. shell windows opened through 'caelestia shell ... open') ignore the [workspace special:X] exec rule, so the special workspace never opens on first toggle. The new option toggles the workspace open after spawning the client command. Fixes #73 --- src/caelestia/subcommands/toggle.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/caelestia/subcommands/toggle.py b/src/caelestia/subcommands/toggle.py index 56565f37..6cc1cd42 100644 --- a/src/caelestia/subcommands/toggle.py +++ b/src/caelestia/subcommands/toggle.py @@ -113,12 +113,17 @@ def run(self) -> None: return spawned = False + toggle_after_spawn = False if self.args.workspace in self.cfg: for client in self.cfg[self.args.workspace].values(): if "enable" in client and client["enable"] and self.handle_client_config(client): spawned = True + # Windows spawned via IPC ignore the [workspace special:X] exec rule, + # so the workspace has to be toggled open explicitly after spawning + if client.get("spawnThenToggle") or client.get("spawn_then_toggle"): + toggle_after_spawn = True - if not spawned: + if not spawned or toggle_after_spawn: hypr.dispatch("togglespecialworkspace", self.args.workspace) def get_clients(self) -> list[dict[str, Any]]: From 312d2e402f11c5804b1ebd14ead753ed6407e951 Mon Sep 17 00:00:00 2001 From: Quinn Bushey Date: Fri, 12 Jun 2026 07:32:23 -0700 Subject: [PATCH 2/2] toggle: drop snake_case spawn_then_toggle variant Keep only the camelCase spawnThenToggle key, per review feedback. --- src/caelestia/subcommands/toggle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/caelestia/subcommands/toggle.py b/src/caelestia/subcommands/toggle.py index 6cc1cd42..0e54cc1f 100644 --- a/src/caelestia/subcommands/toggle.py +++ b/src/caelestia/subcommands/toggle.py @@ -120,7 +120,7 @@ def run(self) -> None: spawned = True # Windows spawned via IPC ignore the [workspace special:X] exec rule, # so the workspace has to be toggled open explicitly after spawning - if client.get("spawnThenToggle") or client.get("spawn_then_toggle"): + if client.get("spawnThenToggle"): toggle_after_spawn = True if not spawned or toggle_after_spawn: