aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-09-16 12:37:23 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-09-16 18:13:52 +0300
commitb66b4399ad2e178c3ba36c6fc5a6e65fd5aa4b17 (patch)
tree78bdbd179d983b5bd94b73600518ffb64d99b9dc /src/config.rs
parent37ec5242640b432c57a3f8a97ae3ebcc46b9e3f3 (diff)
downloadniri-b66b4399ad2e178c3ba36c6fc5a6e65fd5aa4b17.tar.gz
niri-b66b4399ad2e178c3ba36c6fc5a6e65fd5aa4b17.tar.bz2
niri-b66b4399ad2e178c3ba36c6fc5a6e65fd5aa4b17.zip
Add keyboard.repeat-rate and keyboard.repeat-delay
Add option to let the users configure the keyboard repeat delay and rate. Also change the default values to mimic the Xorg, which is also the values used by default by the majority of the compositors. Fixes: #7
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index a5030ea4..354a1c6f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -30,6 +30,12 @@ pub struct Input {
pub struct Keyboard {
#[knuffel(child, default)]
pub xkb: Xkb,
+ // The default value represents the one used by Xorg.
+ #[knuffel(child, unwrap(argument), default = 660)]
+ pub repeat_delay: u16,
+ // The default value represents the one used by Xorg.
+ #[knuffel(child, unwrap(argument), default = 25)]
+ pub repeat_rate: u8,
}
#[derive(knuffel::Decode, Debug, Default, PartialEq, Eq)]
@@ -244,6 +250,8 @@ mod tests {
r#"
input {
keyboard {
+ repeat-delay 660
+ repeat-rate 25
xkb {
layout "us,ru"
options "grp:win_space_toggle"
@@ -277,6 +285,8 @@ mod tests {
options: Some("grp:win_space_toggle".to_owned()),
..Default::default()
},
+ repeat_delay: 660,
+ repeat_rate: 25,
},
touchpad: Touchpad {
tap: true,