[PR #676] [MERGED] feat(wm): add grid layout #1048

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

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/676
Author: @javierportillo
Created: 2/19/2024
Status: Merged
Merged: 2/25/2024
Merged by: @LGUG2Z

Base: masterHead: feature/grid-layout


📝 Commits (6)

  • ba59fe3 feat(wm): add grid layout
  • 8e91bd1 feat(grid): adds no-operations for Promote and PromoteFocus commands
  • 37f3537 fix(grid): prevents axis flips on grid layout
  • ca6c2f8 refactor(grid): use matches! for early returns
  • b4f38ae feat(wm): passes optional op_direction and count to _index functions
  • 9926227 fix(grid): enables flip_layout and make it behave correctly

📊 Changes

4 files changed (+202 additions, -26 deletions)

View changed files

📝 komorebi-core/src/arrangement.rs (+52 -0)
📝 komorebi-core/src/default_layout.rs (+5 -2)
📝 komorebi-core/src/direction.rs (+129 -20)
📝 komorebi/src/window_manager.rs (+16 -4)

📄 Description

Adds a new layout based on the Grid layout on LeftWM.

vlcsnap-2024-02-19-10h33m19s959

Things I would Like to discuss that I'm not so sure about:

  1. I needed to add the op_direction and count to the Direction trait to be able to calculate the grid neighbor, causing it to also be passed to the CustomLayout operations, but left unused.

  2. Also, I had to add a couple of #[allow(clippy::cast_possible_truncation)] insted of actually solving the casting problems. I'm too much of a rust newbie to deal with that so I please tell me if I can do something about it, other than that I hope It is actually usable and shipable.

Thank you so much for Komorebi in general, I used to love using i3 on Arch (btw) but had to switch to Windows and I really missed a tiling WM, so Komorebi has been a blessing to me. Thanks!


🔄 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/676 **Author:** [@javierportillo](https://github.com/javierportillo) **Created:** 2/19/2024 **Status:** ✅ Merged **Merged:** 2/25/2024 **Merged by:** [@LGUG2Z](https://github.com/LGUG2Z) **Base:** `master` ← **Head:** `feature/grid-layout` --- ### 📝 Commits (6) - [`ba59fe3`](https://github.com/LGUG2Z/komorebi/commit/ba59fe316ac638e802591f7df0b2a90af2682d6c) feat(wm): add grid layout - [`8e91bd1`](https://github.com/LGUG2Z/komorebi/commit/8e91bd18bda47d6e3ebc792a061406d336d61fa5) feat(grid): adds no-operations for Promote and PromoteFocus commands - [`37f3537`](https://github.com/LGUG2Z/komorebi/commit/37f3537c77bb105b6e4985138cb84fdb438f55b9) fix(grid): prevents axis flips on grid layout - [`ca6c2f8`](https://github.com/LGUG2Z/komorebi/commit/ca6c2f8a541ed99f1c063cc4162a43d3e211f3b2) refactor(grid): use matches! for early returns - [`b4f38ae`](https://github.com/LGUG2Z/komorebi/commit/b4f38aeb4ee747074c50d6ad15d66a23eff07e12) feat(wm): passes optional op_direction and count to <dir>_index functions - [`9926227`](https://github.com/LGUG2Z/komorebi/commit/99262279d7ac528d998127b1327d1d7ba6e2907e) fix(grid): enables flip_layout and make it behave correctly ### 📊 Changes **4 files changed** (+202 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `komorebi-core/src/arrangement.rs` (+52 -0) 📝 `komorebi-core/src/default_layout.rs` (+5 -2) 📝 `komorebi-core/src/direction.rs` (+129 -20) 📝 `komorebi/src/window_manager.rs` (+16 -4) </details> ### 📄 Description Adds a new layout based on the Grid layout on LeftWM. ![vlcsnap-2024-02-19-10h33m19s959](https://github.com/LGUG2Z/komorebi/assets/17260001/2537af5b-e8ee-4fde-a8ad-6c03677f2236) Things I would Like to discuss that I'm not so sure about: 1. I needed to add the `op_direction` and `count` to the `Direction` trait to be able to calculate the grid neighbor, causing it to also be passed to the CustomLayout operations, but left unused. 2. Also, I had to add a couple of `#[allow(clippy::cast_possible_truncation)]` insted of actually solving the casting problems. I'm too much of a rust newbie to deal with that so I please tell me if I can do something about it, other than that I hope It is actually usable and shipable. Thank you so much for Komorebi in general, I used to love using i3 on Arch (btw) but had to switch to Windows and I really missed a tiling WM, so Komorebi has been a blessing to me. Thanks! --- <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:53:55 +01:00
adam closed this issue 2026-01-05 14:53:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1048