mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Implement hide cursor on key press and on timeout
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user