Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/wiki/Configuration:-Input.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ input {
// warp-mouse-to-focus
// focus-follows-mouse max-scroll-amount="0%"
// workspace-auto-back-and-forth
// disable-mouse-warp-to-focused-output

// mod-key "Super"
// mod-key-nested "Alt"
Expand Down Expand Up @@ -364,6 +365,18 @@ input {
}
```

#### `disable-mouse-warp-to-focused-output`

<sup>Since: next release</sup>

Prevents warping the cursor to a different output when switching monitors.

```kdl
input {
disable-mouse-warp-to-focused-output
}
```

#### `mod-key`, `mod-key-nested`

<sup>Since: 25.05</sup>
Expand Down
4 changes: 4 additions & 0 deletions niri-config/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub struct Input {
pub workspace_auto_back_and_forth: bool,
pub mod_key: Option<ModKey>,
pub mod_key_nested: Option<ModKey>,
pub disable_mouse_warp_to_focused_output: bool,
}

#[derive(knuffel::Decode, Debug, Default, PartialEq)]
Expand Down Expand Up @@ -53,6 +54,8 @@ pub struct InputPart {
pub mod_key: Option<ModKey>,
#[knuffel(child, unwrap(argument, str))]
pub mod_key_nested: Option<ModKey>,
#[knuffel(child)]
pub disable_mouse_warp_to_focused_output: Option<Flag>,
}

impl MergeWith<InputPart> for Input {
Expand All @@ -62,6 +65,7 @@ impl MergeWith<InputPart> for Input {
keyboard,
disable_power_key_handling,
workspace_auto_back_and_forth,
disable_mouse_warp_to_focused_output,
);

merge_clone!(
Expand Down
1 change: 1 addition & 0 deletions niri-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ mod tests {
mod_key_nested: Some(
Super,
),
disable_mouse_warp_to_focused_output: false,
},
outputs: Outputs(
[
Expand Down
Loading