mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
[cfg-breaking] Rename hide-on-key-press to hide-when-typing
I originally preferred on-key-press, but when-typing feels more natural and matches sway. This setting had not been in a stable release yet so this is not stable release cfg breaking.
This commit is contained in:
@@ -666,7 +666,7 @@ pub struct Cursor {
|
||||
#[knuffel(child, unwrap(argument), default = 24)]
|
||||
pub xcursor_size: u8,
|
||||
#[knuffel(child)]
|
||||
pub hide_on_key_press: bool,
|
||||
pub hide_when_typing: bool,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub hide_after_inactive_ms: Option<u32>,
|
||||
}
|
||||
@@ -676,7 +676,7 @@ impl Default for Cursor {
|
||||
Self {
|
||||
xcursor_theme: String::from("default"),
|
||||
xcursor_size: 24,
|
||||
hide_on_key_press: false,
|
||||
hide_when_typing: false,
|
||||
hide_after_inactive_ms: None,
|
||||
}
|
||||
}
|
||||
@@ -3061,7 +3061,7 @@ mod tests {
|
||||
cursor {
|
||||
xcursor-theme "breeze_cursors"
|
||||
xcursor-size 16
|
||||
hide-on-key-press
|
||||
hide-when-typing
|
||||
hide-after-inactive-ms 3000
|
||||
}
|
||||
|
||||
@@ -3286,7 +3286,7 @@ mod tests {
|
||||
cursor: Cursor {
|
||||
xcursor_theme: String::from("breeze_cursors"),
|
||||
xcursor_size: 16,
|
||||
hide_on_key_press: true,
|
||||
hide_when_typing: true,
|
||||
hide_after_inactive_ms: Some(3000),
|
||||
},
|
||||
screenshot_path: Some(String::from("~/Screenshots/screenshot.png")),
|
||||
|
||||
+1
-1
@@ -423,7 +423,7 @@ impl State {
|
||||
}
|
||||
|
||||
fn hide_cursor_if_needed(&mut self) {
|
||||
if !self.niri.config.borrow().cursor.hide_on_key_press {
|
||||
if !self.niri.config.borrow().cursor.hide_when_typing {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ cursor {
|
||||
xcursor-theme "breeze_cursors"
|
||||
xcursor-size 48
|
||||
|
||||
hide-on-key-press
|
||||
hide-when-typing
|
||||
hide-after-inactive-ms 1000
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ cursor {
|
||||
}
|
||||
```
|
||||
|
||||
#### `hide-on-key-press`
|
||||
#### `hide-when-typing`
|
||||
|
||||
<sup>Since: 0.1.10</sup>
|
||||
|
||||
@@ -117,7 +117,7 @@ If set, hides the cursor when pressing a key on the keyboard.
|
||||
|
||||
```kdl
|
||||
cursor {
|
||||
hide-on-key-press
|
||||
hide-when-typing
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user