customizable watch

This commit is contained in:
galister
2024-02-05 19:54:39 +01:00
parent 0cf824388f
commit 95f587279c
8 changed files with 672 additions and 168 deletions

View File

@@ -2,6 +2,7 @@ use crate::config_io;
use crate::config_io::get_conf_d_path;
use crate::load_with_fallback;
use crate::overlays::keyboard;
use crate::overlays::watch::WatchConfig;
use log::error;
use serde::Deserialize;
use serde::Serialize;
@@ -71,6 +72,11 @@ pub fn load_keyboard() -> keyboard::Layout {
serde_yaml::from_str(&yaml_data).expect("Failed to parse keyboard.yaml")
}
pub fn load_watch() -> WatchConfig {
let yaml_data = load_with_fallback!("watch.yaml", "res/watch.yaml");
serde_yaml::from_str(&yaml_data).expect("Failed to parse watch.yaml")
}
pub fn load_general() -> GeneralConfig {
let mut yaml_data = String::new();