diff options
| author | cashmere <cashmere@autistici.org> | 2026-07-29 09:10:42 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-07-29 09:10:42 +0200 |
| commit | 5b77a6d8f19500eee21a497ce84db538ded05c00 (patch) | |
| tree | 13e72121a7835fd0fed34f709b6e277e624a56dc /src/config.rs | |
| parent | e2f5e1267cc30b73202c85aacfaee0cd6b18193c (diff) | |
| download | i3bar-mango-5b77a6d8f19500eee21a497ce84db538ded05c00.tar.gz | |
add collapsible SNI system tray, rename project to i3bar-mango
Tray: the bar acts as org.kde.StatusNotifierWatcher plus host (zbus),
rendering items on the right edge with icon/name; [tray] config toggles
expanded, show_icon, show_name, show_description. Clicks map to
Activate/SecondaryActivate/ContextMenu.
Rename: package, binary, config dir, layer-shell namespace and DBus
names are now i3bar-mango; mango is the default feature and the first
WM provider tried.
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, |
