mirror of https://github.com/k0kubun/xremap
Start parsing the config
parent
2590a84654
commit
2db606bce3
@ -0,0 +1,24 @@
|
||||
use std::error::Error;
|
||||
use std::fs;
|
||||
|
||||
pub fn load_config(filename: &str) -> Result<Config, Box<dyn Error>> {
|
||||
let yaml = fs::read_to_string(&filename).unwrap();
|
||||
println!("{}", yaml.len());
|
||||
return Ok(Config { modmap: vec![], keymap: vec![] })
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub modmap: Vec<Modmap>,
|
||||
pub keymap: Vec<Keymap>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Modmap {
|
||||
// TODO
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Keymap {
|
||||
// TODO
|
||||
}
|
Loading…
Reference in New Issue