[FEAT]: Stacked by default #419

Closed
opened 2026-01-05 14:50:37 +01:00 by adam · 12 comments
Owner

Originally created by @arialdomartini on GitHub (Jun 25, 2024).

In i3 I like to work with stacked windows. When a new window is created, I like that if I am in stack mode, it is automatically stacked with the other ones.
This gives me the chance to have only 1 window at once on the screen and to keep this layout even adding or closing Windows.

Describe the solution you'd like
An option that would stack a new windows with the current one, if this is stacked.

Describe alternatives you've considered
I always do a Komorebic("stack left") every time I open a new window.

Additional context
Say I have to open 10 windows: there is little convenience to have all of them visible. It makes sense to stack them and to have only few (or even 1) open at a time.
I find way more convenient to un-stack a window when I need to have it visible together another one than the opposite.
All the komorebi's layout assume that, unless a specific command is explicitly given by the user, each new window is displayed together with the existing ones, adding up on the screen.
I would suggest the opposite behavior: if the user is in monocle mode, opening a new window should keep this mode. Likely, if the user is displaying one window of n stacked windows, opening a new application should result in n+1 stacked windows, with the last one visible.

So, stack by default could be an additional default layout to add to komorebi.

Originally created by @arialdomartini on GitHub (Jun 25, 2024). In i3 I like to work with stacked windows. When a new window is created, I like that if I am in stack mode, it is automatically stacked with the other ones. This gives me the chance to have only 1 window at once on the screen and to keep this layout even adding or closing Windows. **Describe the solution you'd like** An option that would stack a new windows with the current one, if this is stacked. **Describe alternatives you've considered** I always do a `Komorebic("stack left")` every time I open a new window. **Additional context** Say I have to open 10 windows: there is little convenience to have all of them visible. It makes sense to stack them and to have only few (or even 1) open at a time. I find way more convenient to un-stack a window when I need to have it visible together another one than the opposite. All the komorebi's layout assume that, unless a specific command is explicitly given by the user, each new window is displayed together with the existing ones, adding up on the screen. I would suggest the opposite behavior: if the user is in monocle mode, opening a new window should keep this mode. Likely, if the user is displaying one window of n stacked windows, opening a new application should result in n+1 stacked windows, with the last one visible. So, stack by default could be an additional default layout to add to komorebi.
adam added the enhancement label 2026-01-05 14:50:37 +01:00
adam closed this issue 2026-01-05 14:50:37 +01:00
Author
Owner

@CtByte commented on GitHub (Jun 25, 2024):

An option on a workspace perhaps that toggles "always stack" could be nice. This way when you want to unstack you can keep the default layout behaviours.

What I've been using are the komorebic stack-all and komorebic unstack commands.

@CtByte commented on GitHub (Jun 25, 2024): An option on a workspace perhaps that toggles "always stack" could be nice. This way when you want to unstack you can keep the default layout behaviours. What I've been using are the `komorebic stack-all` and `komorebic unstack` commands.
Author
Owner

@LGUG2Z commented on GitHub (Jun 25, 2024):

Sounds like this: https://lgug2z.github.io/komorebi/cli/toggle-window-container-behaviour.html

Toggle the behaviour for new windows (stacking or dynamic tiling)

Usage: komorebic.exe toggle-window-container-behaviour

Options:
  -h, --help
          Print help
@LGUG2Z commented on GitHub (Jun 25, 2024): Sounds like this: https://lgug2z.github.io/komorebi/cli/toggle-window-container-behaviour.html ``` Toggle the behaviour for new windows (stacking or dynamic tiling) Usage: komorebic.exe toggle-window-container-behaviour Options: -h, --help Print help ```
Author
Owner

@CtByte commented on GitHub (Jun 25, 2024):

This just proves that we already are spoiled by options 😄 I missed this

This is a global option, right? and we need to set it when running komorebi, there is no way to use the komorebi.json settings.

@CtByte commented on GitHub (Jun 25, 2024): This just proves that we already are spoiled by options 😄 I missed this This is a global option, right? and we need to set it when running komorebi, there is no way to use the `komorebi.json` settings.
Author
Owner

@CtByte commented on GitHub (Jun 25, 2024):

I tried komorebic stop; komorebic start; komorebic toggle-window-container-behaviour and it does not seem to behave.

It does try to stack windows, but komorebi crashes for me after some time.

Edit: anyway, should I open a bug report instead? I would like to wait and see if this actually a suitable feature for @arialdomartini

@CtByte commented on GitHub (Jun 25, 2024): I tried `komorebic stop; komorebic start; komorebic toggle-window-container-behaviour` and it does not seem to behave. It does try to stack windows, but komorebi crashes for me after some time. Edit: anyway, should I open a bug report instead? I would like to wait and see if this actually a suitable feature for @arialdomartini
Author
Owner

@LGUG2Z commented on GitHub (Jun 25, 2024):

The general idea is to run komorebic toggle-window-container-behaviour via a keybind when you want the next window(s) to be stacked on top of the currently focused window, and then toggle it off when you don't want that behaviour anymore.

I haven't actually used this for a while myself (one person requested years ago) and I noticed a few bugs around rendering especially when stackbar is enabled which I just pushed a fix for.

There is probably also an edge case where WindowContainerBehaviour::Append will log an error when used on an empty workspace (since there is nothing to append to).

I haven't come across any crashes yet, but I'll keep running and keep an eye out

@LGUG2Z commented on GitHub (Jun 25, 2024): The general idea is to run `komorebic toggle-window-container-behaviour` via a keybind when you want the next window(s) to be stacked on top of the currently focused window, and then toggle it off when you don't want that behaviour anymore. I haven't actually used this for a while myself (one person requested years ago) and I noticed a few bugs around rendering especially when stackbar is enabled which I just pushed a fix for. There is probably also an edge case where `WindowContainerBehaviour::Append` will log an error when used on an empty workspace (since there is nothing to append to). I haven't come across any crashes yet, but I'll keep running and keep an eye out
Author
Owner

@CtByte commented on GitHub (Jun 26, 2024):

@LGUG2Z After updating to 1d0ac9b555 I did not experience any issues. Thank you!

@arialdomartini using a keyboard shortcut to execute the komorebic toggle-window-container-behaviour command seems to be what you are looking for, but the default is dynamic tiling, which cannot be changed currently. After every start, you need to call the command.

I imagine, that this command can be added in the startup as well. One convenient addition could be to set the default in the komorebi.json file, but for that you need to convince @LGUG2Z 😉

@CtByte commented on GitHub (Jun 26, 2024): @LGUG2Z After updating to 1d0ac9b55549827914b6fd453751cef489402dac I did not experience any issues. Thank you! @arialdomartini using a keyboard shortcut to execute the `komorebic toggle-window-container-behaviour` command seems to be what you are looking for, but the default is `dynamic tiling`, which cannot be changed currently. After every start, you need to call the command. I imagine, that this command can be added in the startup as well. One convenient addition could be to set the default in the `komorebi.json` file, but for that you need to convince @LGUG2Z 😉
Author
Owner

@LGUG2Z commented on GitHub (Jun 26, 2024):

There is probably also an edge case where WindowContainerBehaviour::Append will log an error when used on an empty workspace (since there is nothing to append to).

Once this behaviour is changed to create a new container on an empty workspace we should be able to add a static config option for this too 🤞

@LGUG2Z commented on GitHub (Jun 26, 2024): > There is probably also an edge case where WindowContainerBehaviour::Append will log an error when used on an empty workspace (since there is nothing to append to). Once this behaviour is changed to create a new container on an empty workspace we should be able to add a static config option for this too 🤞
Author
Owner

@LGUG2Z commented on GitHub (Jun 26, 2024):

Actually this is already in the static config 😅

https://komorebi.lgug2z.com/schema#window_container_behaviour

@LGUG2Z commented on GitHub (Jun 26, 2024): Actually this is already in the static config 😅 https://komorebi.lgug2z.com/schema#window_container_behaviour
Author
Owner

@LGUG2Z commented on GitHub (Jun 26, 2024):

"window_container_behaviour": "Append" on master should "just work" 🤞

@LGUG2Z commented on GitHub (Jun 26, 2024): `"window_container_behaviour": "Append"` on `master` should "just work" 🤞
Author
Owner

@beingshafin commented on GitHub (Sep 24, 2025):

"window_container_behaviour": "Append" on master should "just work" 🤞

Hey I was wondering, if there is an option to stack/append windows on specified workspaces? as workspace rule. This would be a life saver.

@beingshafin commented on GitHub (Sep 24, 2025): > `"window_container_behaviour": "Append"` on `master` should "just work" 🤞 Hey I was wondering, if there is an option to stack/append windows on specified workspaces? as workspace rule. This would be a life saver.
Author
Owner

@LGUG2Z commented on GitHub (Sep 24, 2025):

You can set this behaviour per workspace here: https://komorebi.lgug2z.com/schema#monitors_items_workspaces_items_window_container_behaviour

@LGUG2Z commented on GitHub (Sep 24, 2025): You can set this behaviour per workspace here: https://komorebi.lgug2z.com/schema#monitors_items_workspaces_items_window_container_behaviour
Author
Owner

@beingshafin commented on GitHub (Sep 24, 2025):

You can set this behaviour per workspace here: https://komorebi.lgug2z.com/schema#monitors_items_workspaces_items_window_container_behaviour

man you are so goated, ilysm.. tysmmmmmmmmmmm 💝💝💝💝💝💝💝
ভাই তুই বেডি হইলে তরেই বিয়া করতাম ফররিয়াল ফররিএয়াল

@beingshafin commented on GitHub (Sep 24, 2025): > You can set this behaviour per workspace here: https://komorebi.lgug2z.com/schema#monitors_items_workspaces_items_window_container_behaviour man you are so goated, ilysm.. tysmmmmmmmmmmm 💝💝💝💝💝💝💝 ভাই তুই বেডি হইলে তরেই বিয়া করতাম ফররিয়াল ফররিএয়াল
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#419