Adds a new layout based on the Grid layout on LeftWM.
Things I would Like to discuss that I'm not so sure about:
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.
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.

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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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:
master← Head:feature/grid-layout📝 Commits (6)
ba59fe3feat(wm): add grid layout8e91bd1feat(grid): adds no-operations for Promote and PromoteFocus commands37f3537fix(grid): prevents axis flips on grid layoutca6c2f8refactor(grid): use matches! for early returnsb4f38aefeat(wm): passes optional op_direction and count to _index functions9926227fix(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.
Things I would Like to discuss that I'm not so sure about:
I needed to add the
op_directionandcountto theDirectiontrait to be able to calculate the grid neighbor, causing it to also be passed to the CustomLayout operations, but left unused.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.