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

@ -117,6 +117,9 @@ pub enum Action {
workspace: Option<Workspace>,
output: OutputMatch,
},
SetRepeatRate {
rate: RepeatRate,
},
}
#[derive(Debug, Clone, Default)]
@ -269,9 +272,16 @@ pub enum ConfigKeymap {
Defined { name: String, map: Keymap },
}
#[derive(Debug, Clone)]
pub struct RepeatRate {
pub rate: i32,
pub delay: i32,
}
#[derive(Debug, Clone)]
pub struct Config {
pub keymap: Option<ConfigKeymap>,
pub repeat_rate: Option<RepeatRate>,
pub shortcuts: Vec<(ModifiedKeySym, Action)>,
pub on_graphics_initialized: Option<Action>,
pub on_idle: Option<Action>,