1
0
Fork 0
forked from wry/wry

config: allow configuring repeat rates via toml

This commit is contained in:
Julian Orth 2024-04-05 17:25:07 +02:00
parent b374947b45
commit 1a9b7146fd
9 changed files with 241 additions and 2 deletions

View file

@ -172,6 +172,9 @@ impl Action {
}
})
}
Action::SetRepeatRate { rate } => {
Box::new(move || s.set_repeat_rate(rate.rate, rate.delay))
}
}
}
}
@ -728,6 +731,11 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
if let Some(keymap) = config.keymap {
state.set_keymap(&keymap);
}
if let Some(repeat_rate) = config.repeat_rate {
persistent
.seat
.set_repeat_rate(repeat_rate.rate, repeat_rate.delay);
}
on_new_connector(move |c| {
for connector in &config.connectors {
if connector.match_.matches(c) {