[FEAT]: add a global default floating window size (or schema key default_floating_bounds) #678

Closed
opened 2026-01-05 14:52:21 +01:00 by adam · 3 comments
Owner

Originally created by @kho-ja on GitHub (Sep 19, 2025).

Eligibility

Individual Commercial Use License

Suggestion

Summary

When I toggle a window to floating (e.g. Alt+T / komorebic toggle-float), the window often opens very small. There is no global config key in komorebi.json to set a default floating size for all windows. Workarounds (per-app rules or AutoHotkey resizing) exist, but a global config option would greatly improve UX.

What I expected

A simple global setting in komorebi.json like:
"default_floating_bounds": { "width": 1200, "height": 800 }
so that any window toggled to floating uses that size unless a per-app rule overrides it.

What actually happens

Toggling a window to float often uses the window’s previous geometry or a very small rectangle, forcing me to manually resize each floated window.

Steps to reproduce

  1. Start komorebi (fill your version)
  2. Focus an app window (e.g. notepad / browser)
  3. Press the configured toggle (Alt+T) or run komorebic toggle-float
  4. Observe the floated window’s small size

Debug info I can attach

  • komorebic --version
  • komorebic state > state.json (I can paste the relevant window entry if you want)
  • A short screen recording showing the toggle + geometry
  • Similar feature request about float-layer/manage floats: #738.
  • There are resize-related bugs (windows snapping back) that may be connected: #1148.

Suggested implementation ideas

  • Add "default_floating_bounds": { "width": <int>, "height": <int> } to the static config schema (with optional x/y fields and per-workspace override).
  • Respect the setting when handling toggle-float, unless a per-app rule provides explicit bounds.

Thanks — I can provide state.json output and a short video if that helps debugging.

Alternatives Considered

Alternatives Considered

  • Per-application rules in komorebi.json
    It is possible to set "state": "floating" and explicit "bounds" for individual apps. However, this requires writing a rule for every application and does not provide a universal default.

  • External hotkey/workaround scripts
    A workaround is to use tools like AutoHotkey or WHKD that first call komorebic toggle-float and then resize the active window. This works, but it adds extra tooling outside of Komorebi and is harder to maintain.

  • Manual resizing after toggle
    The fallback approach is to manually resize each floated window. This is inconsistent and time-consuming for frequent use.

Originally created by @kho-ja on GitHub (Sep 19, 2025). ### Eligibility Individual Commercial Use License ### Suggestion Summary ------- When I toggle a window to floating (e.g. Alt+T / `komorebic toggle-float`), the window often opens very small. There is no global config key in `komorebi.json` to set a default floating size for all windows. Workarounds (per-app rules or AutoHotkey resizing) exist, but a global config option would greatly improve UX. What I expected --------------- A simple global setting in `komorebi.json` like: "default_floating_bounds": { "width": 1200, "height": 800 } so that any window toggled to floating uses that size unless a per-app rule overrides it. What actually happens -------------------- Toggling a window to float often uses the window’s previous geometry or a very small rectangle, forcing me to manually resize each floated window. Steps to reproduce ------------------ 1. Start komorebi (fill your version) 2. Focus an app window (e.g. notepad / browser) 3. Press the configured toggle (Alt+T) or run `komorebic toggle-float` 4. Observe the floated window’s small size Debug info I can attach ----------------------- - `komorebic --version` - `komorebic state > state.json` (I can paste the relevant window entry if you want) - A short screen recording showing the toggle + geometry Related ------- - Similar feature request about float-layer/manage floats: #738. - There are resize-related bugs (windows snapping back) that may be connected: #1148. Suggested implementation ideas ------------------------------ - Add `"default_floating_bounds": { "width": <int>, "height": <int> }` to the static config schema (with optional `x`/`y` fields and per-workspace override). - Respect the setting when handling `toggle-float`, unless a per-app rule provides explicit `bounds`. Thanks — I can provide `state.json` output and a short video if that helps debugging. ### Alternatives Considered Alternatives Considered ----------------------- - **Per-application rules in `komorebi.json`** It is possible to set `"state": "floating"` and explicit `"bounds"` for individual apps. However, this requires writing a rule for every application and does not provide a universal default. - **External hotkey/workaround scripts** A workaround is to use tools like AutoHotkey or WHKD that first call `komorebic toggle-float` and then resize the active window. This works, but it adds extra tooling outside of Komorebi and is harder to maintain. - **Manual resizing after toggle** The fallback approach is to manually resize each floated window. This is inconsistent and time-consuming for frequent use.
adam added the enhancement label 2026-01-05 14:52:21 +01:00
adam closed this issue 2026-01-05 14:52:21 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 19, 2025):

Feature requests on this repository are only open to current GitHub sponsors on the $5/month tier and above, people with a valid individual commercial use license, and approved contributors.
This issue has been automatically closed until one of those pre-requisites can be validated.

@github-actions[bot] commented on GitHub (Sep 19, 2025): Feature requests on this repository are only open to current [GitHub sponsors](https://github.com/sponsors/LGUG2Z) on the $5/month tier and above, people with a valid [individual commercial use license](https://lgug2z.com/software/komorebi), and approved contributors. This issue has been automatically closed until one of those pre-requisites can be validated.
Author
Owner

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

Check out these options

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

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

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

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

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

You can turn off resizing completely, or resize by a more favorable aspect ratio

I don't have any plans to work on an option to specify size by pixels when floating, but I would consider a PR from anyone who wants to work on it

@LGUG2Z commented on GitHub (Sep 19, 2025): Check out these options https://komorebi.lgug2z.com/schema#floating_window_aspect_ratio https://komorebi.lgug2z.com/schema#floating_layer_placement https://komorebi.lgug2z.com/schema#float_rule_placement https://komorebi.lgug2z.com/schema#float_override_placement https://komorebi.lgug2z.com/schema#toggle_float_placement You can turn off resizing completely, or resize by a more favorable aspect ratio I don't have any plans to work on an option to specify size by pixels when floating, but I would consider a PR from anyone who wants to work on it
Author
Owner

@kho-ja commented on GitHub (Sep 19, 2025):

Oh I did not expect you are gonna write me. Thank you for your respond.

I checked your links but unfortunately these wasn't what I wanted. But good enough. Thanks!

@kho-ja commented on GitHub (Sep 19, 2025): Oh I did not expect you are gonna write me. Thank you for your respond. I checked your links but unfortunately these wasn't what I wanted. But good enough. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#678