FAQ: Mention directly opening in column, and focus-follows-mouse on monitor edges
Browse files at this commit3850739e445b95a73c2466a718ccaf3a9a406c06Parent: 4d4d9681 changed file +26 -0
- docs/wiki/FAQ.md +26 -0
docs/wiki/FAQ.mdmodified+26 -0
| @@ -83,3 +83,29 @@ For example, [nirius](https://git.sr.ht/~tsdh/nirius) seems to have this feature | |||
| 83 | Firefox seems to first open the Bitwarden window with a generic Firefox title, and only later change the window title to Bitwarden, so you can't effectively target it with an `open-floating` window rule. | 83 | Firefox seems to first open the Bitwarden window with a generic Firefox title, and only later change the window title to Bitwarden, so you can't effectively target it with an `open-floating` window rule. |
| 84 | 84 | ||
| 85 | You'll need to use a script, for example [this one](https://github.com/YaLTeR/niri/discussions/1599) or other ones (search niri issues and discussions for Bitwarden). | 85 | You'll need to use a script, for example [this one](https://github.com/YaLTeR/niri/discussions/1599) or other ones (search niri issues and discussions for Bitwarden). |
| 86 | + | ||
| 87 | +### Can I open a window directly in the current column / in the same column as another window? | ||
| 88 | + | ||
| 89 | +No, but you can script the behavior you want with the [niri IPC](./IPC.md). | ||
| 90 | +Listen to the event stream for a new window opening, then call an action like `consume-or-expel-window-left`. | ||
| 91 | + | ||
| 92 | +Adding this directly to niri is challenging: | ||
| 93 | + | ||
| 94 | +- The act of "opening a window directly in some column" by itself is quite involved. Niri will have to compute the exact initial window size provided how other windows in a column would resize in response. This logic exists, but it isn't directly pluggable to the code computing a size for a new window. Then, it'll need to handle all sorts of edge cases like the column disappearing, or new windows getting added to the column, before the target window had a chance to appear. | ||
| 95 | +- How do you indicate if a new window should spawn in an existing column (and in which one), as opposed to a new column? Different people seem to have different needs here (including very complex rules based on parent PID, etc.), and it's very unclear design-wise what kind of (simple) setting is actually needed and would be useful. See also https://github.com/YaLTeR/niri/discussions/1125. | ||
| 96 | + | ||
| 97 | +### Why does moving the mouse against a monitor edge focus the next window, but only sometimes? | ||
| 98 | + | ||
| 99 | +This can happen with [`focus-follows-mouse`](./Configuration:-Input.md#focus-follows-mouse). | ||
| 100 | +When using client-side decorations, windows are supposed to have some margins outside their geometry for the mouse resizing handles. | ||
| 101 | +These margins "peek out" of the monitor edges since they're outside the window geometry, and `focus-follows-mouse` triggers when the mouse crosses them. | ||
| 102 | + | ||
| 103 | +It doesn't always happen: | ||
| 104 | + | ||
| 105 | +- Some toolkits don't put resize handles outside the window geometry. Then there's no input area outside, so nowhere for `focus-follows-mouse` to trigger. | ||
| 106 | +- If the current window has its own margin for resizing, and it extends all the way to the monitor edge, then `focus-follows-mouse` won't trigger because the mouse will never leave the current window. | ||
| 107 | + | ||
| 108 | +To fix this, you can: | ||
| 109 | + | ||
| 110 | +- Use `focus-follows-mouse max-scroll-amount="0%"`, which will prevent `focus-follows-mouse` from triggering when it would cause scrolling. | ||
| 111 | +- Set `prefer-no-csd` which will generally cause clients to remove those resizing margins. | ||