[FEAT]: CLI Command (hotkey) to send focussed window(s) to initial_workspace if one exists #439

Closed
opened 2026-01-05 14:50:45 +01:00 by adam · 1 comment
Owner

Originally created by @aleckslu on GitHub (Jul 27, 2024).

Describe the solution you'd like
Just an additional CLI command to send a window to its initial_workspace IF it's included in any "initial_workspace_rules".

Additionally, maybe another CLI command to send all windows back to their initial workspaces (even those not in the active workspace).

Describe alternatives you've considered
Only looked through existing CLI commands. I would imagine it can be possible with a very specific autohotkey script, but haven't gotten into learning ahk too much just yet.

Additional context
Just as an example, if i have:

"initial_workspace_rules": [
    { "kind": "Exe", "id": "Discord.exe" }
]

for workspace 3
And I am currently focused on the Discord window on workspace 2 pressing my hotkey bound to komorebic send-to-initial-workspace will send Discord back to workspace 3

Pressing the hotkey when the focused window doesn't belong to any initial_workspace_rules will just do nothing

Originally created by @aleckslu on GitHub (Jul 27, 2024). **Describe the solution you'd like** Just an additional CLI command to send a window to its initial_workspace IF it's included in any "initial_workspace_rules". Additionally, maybe another CLI command to send all windows back to their initial workspaces (even those not in the active workspace). **Describe alternatives you've considered** Only looked through existing CLI commands. I would imagine it can be possible with a very specific autohotkey script, but haven't gotten into learning ahk too much just yet. **Additional context** Just as an example, if i have: ``` "initial_workspace_rules": [ { "kind": "Exe", "id": "Discord.exe" } ] ``` for workspace `3` And I am currently focused on the Discord window on workspace `2` pressing my hotkey bound to `komorebic send-to-initial-workspace` will send Discord back to workspace `3` Pressing the hotkey when the focused window doesn't belong to any `initial_workspace_rules` will just do nothing
adam added the enhancement label 2026-01-05 14:50:45 +01:00
adam closed this issue 2026-01-05 14:50:45 +01:00
Author
Owner

@alex-ds13 commented on GitHub (Jan 8, 2025):

@aleckslu There is now a new command komorebic enforce-workspace-rules which reapplies the initial workspace rules one more time again. This command applies to all windows that match an initial workspace rule.

@alex-ds13 commented on GitHub (Jan 8, 2025): @aleckslu There is now a new command `komorebic enforce-workspace-rules` which reapplies the initial workspace rules one more time again. This command applies to all windows that match an initial workspace rule.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#439