aboutsummaryrefslogtreecommitdiff
path: root/wiki/Configuration:-Input.md
diff options
context:
space:
mode:
authorFlorian Finkernagel <finkernagel@imt.uni-marburg.de>2025-03-13 14:55:16 +0100
committerIvan Molodetskikh <yalterz@gmail.com>2025-03-22 01:00:43 -0700
commit7f72c358d56453633b57bc353a458709fe878b63 (patch)
treeb3ded6d3a1bb8129d08a7565fc25bd75dd3677b0 /wiki/Configuration:-Input.md
parent0d4f0f00c0cd83a72151468bc610ce230a550027 (diff)
downloadniri-7f72c358d56453633b57bc353a458709fe878b63.tar.gz
niri-7f72c358d56453633b57bc353a458709fe878b63.tar.bz2
niri-7f72c358d56453633b57bc353a458709fe878b63.zip
Add option to warp-mouse-to-focus to always center
Diffstat (limited to 'wiki/Configuration:-Input.md')
-rw-r--r--wiki/Configuration:-Input.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/wiki/Configuration:-Input.md b/wiki/Configuration:-Input.md
index 9245583b..4a4c62ec 100644
--- a/wiki/Configuration:-Input.md
+++ b/wiki/Configuration:-Input.md
@@ -243,7 +243,7 @@ input {
Makes the mouse warp to newly focused windows.
-X and Y coordinates are computed separately, i.e. if moving the mouse only horizontally is enough to put it inside the newly focused window, then it will move only horizontally.
+Does not make the cursor visible if it had been hidden.
```kdl
input {
@@ -251,6 +251,21 @@ input {
}
```
+By default, the cursor warps *separately* horizontally and vertically.
+I.e. if moving the mouse only horizontally is enough to put it inside the newly focused window, then the mouse will move only horizontally, and not vertically.
+
+<sup>Since: next release</sup> You can customize this with the `mode` property.
+
+- `mode="center-xy"`: warps by both X and Y coordinates together.
+So if the mouse was anywhere outside the newly focused window, it will warp to the center of the window.
+- `mode="center-xy-always"`: warps by both X and Y coordinates together, even if the mouse was already somewhere inside the newly focused window.
+
+```kdl
+input {
+ warp-mouse-to-focus mode="center-xy"
+}
+```
+
#### `focus-follows-mouse`
Focuses windows and outputs automatically when moving the mouse over them.