Skip to content

fix: special workspace toggle for IPC-spawned windows#115

Open
Mestane wants to merge 1 commit into
caelestia-dots:mainfrom
Mestane:fix/IPC-spawned-windows
Open

fix: special workspace toggle for IPC-spawned windows#115
Mestane wants to merge 1 commit into
caelestia-dots:mainfrom
Mestane:fix/IPC-spawned-windows

Conversation

@Mestane

@Mestane Mestane commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR fixes an issue where windows spawned through IPC (for example, caelestia shell controlCenter open) do not end up on the intended special workspace.

Problem

Some applications create their windows through IPC. In those cases, Hyprland's [workspace special:X] rule is not applied, causing the window to open on the currently focused workspace instead.

The existing logic only calls togglespecialworkspace when no client was spawned. As a result:

  1. Running the command for the first time spawns the window, but does not toggle the special workspace.
  2. Running the command again finds the existing window and finally toggles the special workspace.

Solution

Introduce an optional spawn_then_toggle flag for clients.

When enabled, the workspace will be toggled even if the client was successfully spawned. This allows IPC-spawned windows to be moved to the intended special workspace immediately after creation while preserving the existing behavior for other clients.

cli.json

        "controlcenter": {
            "Caelestia Settings - Network": {
                "enable": true,
                "match": [{ "initialTitle": "Caelestia Settings - Network" }],
                "command": ["caelestia", "shell", "controlCenter", "open"],
                "move": true,
                "spawn_then_toggle": true
            }
        },

Fixed: #73

@Mestane Mestane changed the title fix: special workspace toggle for IPC-spawned windows #73 fix: special workspace toggle for IPC-spawned windows Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] toggleing special workspace execute command but not open workspace

1 participant