fixed some overhead + updated readme
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user