fixed some overhead + updated readme

This commit is contained in:
2026-03-13 17:27:17 +01:00
parent 231a1b66c8
commit 5c942aebd2
6 changed files with 117 additions and 73 deletions
+15
View File
@@ -20,6 +20,8 @@ pub struct Config {
pub pool: PoolConfig,
#[serde(default)]
pub power: PowerConfig,
#[serde(default)]
pub buds: BudsConfig,
}
#[derive(Deserialize)]
@@ -130,6 +132,19 @@ impl Default for PowerConfig {
}
}
#[derive(Deserialize)]
pub struct BudsConfig {
pub mac: String,
}
impl Default for BudsConfig {
fn default() -> Self {
Self {
mac: "B4:23:A2:09:D3:53".to_string(),
}
}
}
pub fn load_config() -> Config {
let config_dir = std::env::var("XDG_CONFIG_HOME")
.map(PathBuf::from)