diff options
| author | yzy-1 <50034950+yzy-1@users.noreply.github.com> | 2024-10-02 08:22:50 +0800 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-10-06 22:09:19 -0700 |
| commit | 42a9daec9db57e16541b6ef236b695b71bfb1199 (patch) | |
| tree | 0268b893aa75df533076287cdfac232870f00deb /niri-config/src | |
| parent | 1ba2be392857b95ba346ee4770f824c42afe0681 (diff) | |
| download | niri-42a9daec9db57e16541b6ef236b695b71bfb1199.tar.gz niri-42a9daec9db57e16541b6ef236b695b71bfb1199.tar.bz2 niri-42a9daec9db57e16541b6ef236b695b71bfb1199.zip | |
Implement hide cursor on key press and on timeout
Diffstat (limited to 'niri-config/src')
| -rw-r--r-- | niri-config/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index cf55ecf1..bf08e1ba 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -615,6 +615,10 @@ pub struct Cursor { pub xcursor_theme: String, #[knuffel(child, unwrap(argument), default = 24)] pub xcursor_size: u8, + #[knuffel(child)] + pub hide_on_key_press: bool, + #[knuffel(child, unwrap(argument))] + pub hide_after_inactive_ms: Option<u32>, } impl Default for Cursor { @@ -622,6 +626,8 @@ impl Default for Cursor { Self { xcursor_theme: String::from("default"), xcursor_size: 24, + hide_on_key_press: false, + hide_after_inactive_ms: None, } } } @@ -2953,6 +2959,8 @@ mod tests { cursor { xcursor-theme "breeze_cursors" xcursor-size 16 + hide-on-key-press + hide-after-inactive-ms 3000 } screenshot-path "~/Screenshots/screenshot.png" @@ -3154,6 +3162,8 @@ mod tests { cursor: Cursor { xcursor_theme: String::from("breeze_cursors"), xcursor_size: 16, + hide_on_key_press: true, + hide_after_inactive_ms: Some(3000), }, screenshot_path: Some(String::from("~/Screenshots/screenshot.png")), hotkey_overlay: HotkeyOverlay { |
