config: allow configuring repeat rates via toml
This commit is contained in:
parent
b374947b45
commit
1a9b7146fd
9 changed files with 241 additions and 2 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue