Since it has been asked, here it is! MOAR Configs! 😄
This commit adds a few more options to combine with the FloatingLayerBehaviour which are the multiple situations placement options. Which are the following:
"toggle_float_placement": the placement to be used by a floating window when it is forced to float with the toggle-float command.
"floating_layer_placement": the placement to be used by a floating window when it is spawned on the floating layer and the user has the floating layer behaviour set to float.
"float_override_placement": the placement to be used by a window that is spawned when float override is active.
"float_rule_placement": the placement to be used by a window that matches a 'floating_applications' rule.
Each Placement can be one of the following types:
"None": windows are spawned wherever Windows positions them with whatever size they had. Komorebi does not change its size or position.
"Center": windows are centered without changing their size.
"CenterAndResize": windows are centered and resized according to the defined aspect ratio.
By default the placements are as follows:
"toggle_float_placement": "CenterAndResize"
"floating_layer_placement": "Center"
"float_override_placement": "None"
"float_rule_placement": "None"
This commit also adds the floating_layer_behaviour as a global config.
@LGUG2Z Let me know what you think about this and if we should change the defaults or not?
🔄 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/1410
**Author:** [@alex-ds13](https://github.com/alex-ds13)
**Created:** 4/14/2025
**Status:** ✅ Merged
**Merged:** 4/20/2025
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `feat/more-floating-behaviour-configs`
---
### 📝 Commits (3)
- [`92c21a1`](https://github.com/LGUG2Z/komorebi/commit/92c21a1b104023d2b27f4312b7d8596ffc645bac) feat(wm): float placement configs
- [`52442fd`](https://github.com/LGUG2Z/komorebi/commit/52442fd46a387beadafcf022b5f367923caa10b6) fix(wm): reset global configs to default when removed from config
- [`2b89d5a`](https://github.com/LGUG2Z/komorebi/commit/2b89d5a2b0b3da791e341ac4b238af7517d9a142) fix(wm): CrossBoundaryBehaviour was wrong on one place
### 📊 Changes
**5 files changed** (+202 additions, -69 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi/src/core/mod.rs` (+67 -4)
📝 `komorebi/src/process_event.rs` (+23 -14)
📝 `komorebi/src/static_config.rs` (+69 -35)
📝 `komorebi/src/window.rs` (+12 -6)
📝 `komorebi/src/window_manager.rs` (+31 -10)
</details>
### 📄 Description
Since it has been asked, here it is! MOAR Configs! 😄
This commit adds a few more options to combine with the `FloatingLayerBehaviour` which are the multiple situations placement options. Which are the following:
- `"toggle_float_placement"`: the placement to be used by a floating window when it is forced to float with the `toggle-float` command.
- `"floating_layer_placement"`: the placement to be used by a floating window when it is spawned on the floating layer and the user has the floating layer behaviour set to float.
- `"float_override_placement"`: the placement to be used by a window that is spawned when float override is active.
- `"float_rule_placement"`: the placement to be used by a window that matches a 'floating_applications' rule.
Each `Placement` can be one of the following types:
- `"None"`: windows are spawned wherever Windows positions them with whatever size they had. Komorebi does not change its size or position.
- `"Center"`: windows are centered without changing their size.
- `"CenterAndResize"`: windows are centered and resized according to the defined aspect ratio.
By default the placements are as follows:
- `"toggle_float_placement"`: `"CenterAndResize"`
- `"floating_layer_placement"`: `"Center"`
- `"float_override_placement"`: `"None"`
- `"float_rule_placement"`: `"None"`
This commit also adds the `floating_layer_behaviour` as a global config.
@LGUG2Z Let me know what you think about this and if we should change the defaults or not?
<!--
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`.
-->
---
<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/1410
Author: @alex-ds13
Created: 4/14/2025
Status: ✅ Merged
Merged: 4/20/2025
Merged by: @LGUG2Z
Base:
master← Head:feat/more-floating-behaviour-configs📝 Commits (3)
92c21a1feat(wm): float placement configs52442fdfix(wm): reset global configs to default when removed from config2b89d5afix(wm): CrossBoundaryBehaviour was wrong on one place📊 Changes
5 files changed (+202 additions, -69 deletions)
View changed files
📝
komorebi/src/core/mod.rs(+67 -4)📝
komorebi/src/process_event.rs(+23 -14)📝
komorebi/src/static_config.rs(+69 -35)📝
komorebi/src/window.rs(+12 -6)📝
komorebi/src/window_manager.rs(+31 -10)📄 Description
Since it has been asked, here it is! MOAR Configs! 😄
This commit adds a few more options to combine with the
FloatingLayerBehaviourwhich are the multiple situations placement options. Which are the following:"toggle_float_placement": the placement to be used by a floating window when it is forced to float with thetoggle-floatcommand."floating_layer_placement": the placement to be used by a floating window when it is spawned on the floating layer and the user has the floating layer behaviour set to float."float_override_placement": the placement to be used by a window that is spawned when float override is active."float_rule_placement": the placement to be used by a window that matches a 'floating_applications' rule.Each
Placementcan be one of the following types:"None": windows are spawned wherever Windows positions them with whatever size they had. Komorebi does not change its size or position."Center": windows are centered without changing their size."CenterAndResize": windows are centered and resized according to the defined aspect ratio.By default the placements are as follows:
"toggle_float_placement":"CenterAndResize""floating_layer_placement":"Center""float_override_placement":"None""float_rule_placement":"None"This commit also adds the
floating_layer_behaviouras a global config.@LGUG2Z Let me know what you think about this and if we should change the defaults or not?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.