diff options
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index e5c04e7..f93d7a8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -50,6 +50,8 @@ pub struct Config { pub blend: bool, pub show_mode: bool, pub start_hidden: bool, + // tray + pub tray: TrayConfig, // wm-specific pub wm: WmConfig, // overrides @@ -98,6 +100,8 @@ impl Default for Config { show_mode: true, start_hidden: false, + tray: TrayConfig::default(), + wm: WmConfig { river: RiverConfig { max_tag: 9 }, }, @@ -148,7 +152,7 @@ fn config_dir() -> Option<PathBuf> { fn config_path() -> Option<PathBuf> { let mut path = config_dir()?; - path.push("i3bar-river"); + path.push("i3bar-mango"); path.push("config.toml"); path.exists().then_some(path) } @@ -189,6 +193,28 @@ impl From<Layer> for zwlr_layer_shell_v1::Layer { } } +#[derive(Deserialize, Debug, Clone, Copy)] +#[serde(deny_unknown_fields, default)] +pub struct TrayConfig { + pub enabled: bool, + pub expanded: bool, + pub show_icon: bool, + pub show_name: bool, + pub show_description: bool, +} + +impl Default for TrayConfig { + fn default() -> Self { + Self { + enabled: true, + expanded: false, + show_icon: true, + show_name: true, + show_description: false, + } + } +} + #[derive(Debug, Deserialize)] pub struct WmConfig { pub river: RiverConfig, |
