Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/caelestia/subcommands/toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
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]]:
Expand Down