[PR #1225] [CLOSED] Wm container feature #1262

Closed
opened 2026-01-05 14:54:41 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/1225
Author: @pro470
Created: 1/10/2025
Status: Closed

Base: masterHead: wm-container-feature


📝 Commits (10+)

  • e4b34bd feat: Add layout-related fields to Container struct with getters and setters
  • 37eae1b feat: Add monocle window functionality to Container struct
  • b40c4bc feat: Implement update method for Container to manage window layouts
  • 65e29de feat: Add NonZeroUsize import for container module
  • cf2c38f feat: Add resize constraint enforcement for Container windows
  • 68d70bd feat: Enhance workspace layout handling for containers with more than 2 windows
  • 7e22196 added CopyGetters that I forgot
  • d8e672d made the window_count greater equals and fixed updated to restore for now need to discuss and maybe change that
  • 3bdacc4 feat: Implement window boundary constraints in non-tiling mode
  • 6bc2d99 fix: Update window positioning logic to use WindowsApi for rect retrieval

📊 Changes

4 files changed (+683 additions, -182 deletions)

View changed files

📝 komorebi/src/container.rs (+473 -10)
📝 komorebi/src/process_event.rs (+165 -139)
📝 komorebi/src/stackbar_manager/mod.rs (+5 -3)
📝 komorebi/src/workspace.rs (+40 -30)

📄 Description

This is a PR about the idea I had of having something between Container and Workspace, but we don't. What I did is to make the Container more capable, a container has its own layout. So what did we break the answer is nothing everything is working I obviously didn't test all commands, but the important ones were tested, and it all worked. With that, we could have something between container and workspace but in the end, it is just a fancier container.

Pros:

  1. One of the biggest things is the layout. We can now have a grid layout on the left side of the screen and something else on the other side. The combination of layouts would be insane. I don't know if there is a limit when it comes to layout windows even with the default layouts that come with komorebi now also think about also customs layout added on top of that
  2. we can move multiple windows at once
  3. we can now have semi paused workspace or better described a paused container.

Cons:

  1. we need to look at the stack bar because it is rendering on the window, not on the container
    yeah, I think it is
    I only have some things to discuss
  2. I am not good at multithreading, so I pass the atomic values as parameters to the function. If you say I can load the atomic values in the container update function. Then I can change it.
  3. because the only thing I did was to add all the features that a workspace has to container. There are some duplicated code blocks. I didn't fix them because I don't know if you like the change and I wanted to show how minimal things we need to change to get the feature to work.

I don't think this code is at your level so you have three options:

  1. I can implement it again, but you need to guide me on what you really want because I am not a good rust developer (rust is hard)
  2. you can implement it yourself
  3. or you can just ignore this PR.

Anyway, see this code as a proof of concept and not like a real PR if I should then do something else then opening the PR. I don't know like opening a discussion or so. You need to tell me.
I didn't implement the commands because I don't know if you like to change how something works this would also change some command's behavior.

Yeah, that's it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/LGUG2Z/komorebi/pull/1225 **Author:** [@pro470](https://github.com/pro470) **Created:** 1/10/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `wm-container-feature` --- ### 📝 Commits (10+) - [`e4b34bd`](https://github.com/LGUG2Z/komorebi/commit/e4b34bd260d17a96304aa4299b440a7bd9f24923) feat: Add layout-related fields to Container struct with getters and setters - [`37eae1b`](https://github.com/LGUG2Z/komorebi/commit/37eae1b4c827dd5b3e0c0bb4f2924490fce0dd1a) feat: Add monocle window functionality to Container struct - [`b40c4bc`](https://github.com/LGUG2Z/komorebi/commit/b40c4bc7b1853f4809f0944f18819c1711d84581) feat: Implement `update` method for Container to manage window layouts - [`65e29de`](https://github.com/LGUG2Z/komorebi/commit/65e29de16eb03a311d7864d0c5f66f6a89e1815e) feat: Add NonZeroUsize import for container module - [`cf2c38f`](https://github.com/LGUG2Z/komorebi/commit/cf2c38f82aee95f62402b3f206889beeb03f4466) feat: Add resize constraint enforcement for Container windows - [`68d70bd`](https://github.com/LGUG2Z/komorebi/commit/68d70bd6a08ce11aa8d7ab7606ec148b6d62a09a) feat: Enhance workspace layout handling for containers with more than 2 windows - [`7e22196`](https://github.com/LGUG2Z/komorebi/commit/7e22196a10d3f74488acf2fc258b73c4c2775e3f) added CopyGetters that I forgot - [`d8e672d`](https://github.com/LGUG2Z/komorebi/commit/d8e672d7c7a00f83c9458a72f94e6f0a38226291) made the window_count greater equals and fixed updated to restore for now need to discuss and maybe change that - [`3bdacc4`](https://github.com/LGUG2Z/komorebi/commit/3bdacc4245571a7192cefef31009a4cdadedcb25) feat: Implement window boundary constraints in non-tiling mode - [`6bc2d99`](https://github.com/LGUG2Z/komorebi/commit/6bc2d99051249eb1972035a2b785655f579b50b9) fix: Update window positioning logic to use WindowsApi for rect retrieval ### 📊 Changes **4 files changed** (+683 additions, -182 deletions) <details> <summary>View changed files</summary> 📝 `komorebi/src/container.rs` (+473 -10) 📝 `komorebi/src/process_event.rs` (+165 -139) 📝 `komorebi/src/stackbar_manager/mod.rs` (+5 -3) 📝 `komorebi/src/workspace.rs` (+40 -30) </details> ### 📄 Description <!-- Please follow the Conventional Commits specification. If you need to update your PR with changes from `master`, please run `git rebase master`. By opening this PR, you confirm that you have read and understood this project's `CONTRIBUTING.md`. --> This is a PR about the idea I had of having something between Container and Workspace, but we don't. What I did is to make the Container more capable, a container has its own layout. So what did we break the answer is nothing everything is working I obviously didn't test all commands, but the important ones were tested, and it all worked. With that, we could have something between container and workspace but in the end, it is just a fancier container. Pros: 1. One of the biggest things is the layout. We can now have a grid layout on the left side of the screen and something else on the other side. The combination of layouts would be insane. I don't know if there is a limit when it comes to layout windows even with the default layouts that come with komorebi now also think about also customs layout added on top of that 2. we can move multiple windows at once 3. we can now have semi paused workspace or better described a paused container. Cons: 1. we need to look at the stack bar because it is rendering on the window, not on the container yeah, I think it is I only have some things to discuss 2. I am not good at multithreading, so I pass the atomic values as parameters to the function. If you say I can load the atomic values in the container update function. Then I can change it. 3. because the only thing I did was to add all the features that a workspace has to container. There are some duplicated code blocks. I didn't fix them because I don't know if you like the change and I wanted to show how minimal things we need to change to get the feature to work. I don't think this code is at your level so you have three options: 1. I can implement it again, but you need to guide me on what you really want because I am not a good rust developer (rust is hard) 2. you can implement it yourself 3. or you can just ignore this PR. Anyway, see this code as a proof of concept and not like a real PR if I should then do something else then opening the PR. I don't know like opening a discussion or so. You need to tell me. I didn't implement the commands because I don't know if you like to change how something works this would also change some command's behavior. Yeah, that's it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-01-05 14:54:41 +01:00
adam closed this issue 2026-01-05 14:54:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1262