summaryrefslogtreecommitdiff
path: root/src/wm_info_provider.rs
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-07-29 09:10:42 +0200
committercashmere <cashmere@autistici.org>2026-07-29 09:10:42 +0200
commit5b77a6d8f19500eee21a497ce84db538ded05c00 (patch)
tree13e72121a7835fd0fed34f709b6e277e624a56dc /src/wm_info_provider.rs
parente2f5e1267cc30b73202c85aacfaee0cd6b18193c (diff)
downloadi3bar-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/wm_info_provider.rs')
-rw-r--r--src/wm_info_provider.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wm_info_provider.rs b/src/wm_info_provider.rs
index 67e5f83..f46c4e0 100644
--- a/src/wm_info_provider.rs
+++ b/src/wm_info_provider.rs
@@ -62,7 +62,13 @@ pub trait WmInfoProvider: Any {
}
}
+#[cfg_attr(not(feature = "river"), allow(unused_variables))]
pub fn bind(conn: &mut Connection<State>, config: &WmConfig) -> Box<dyn WmInfoProvider> {
+ #[cfg(feature = "mango")]
+ if let Some(mango) = MangoInfoProvider::new() {
+ return Box::new(mango);
+ }
+
#[cfg(feature = "river")]
if let Some(river) = RiverInfoProvider::bind(conn, config) {
return Box::new(river);
@@ -78,11 +84,6 @@ pub fn bind(conn: &mut Connection<State>, config: &WmConfig) -> Box<dyn WmInfoPr
return Box::new(niri);
}
- #[cfg(feature = "mango")]
- if let Some(mango) = MangoInfoProvider::new() {
- return Box::new(mango);
- }
-
Box::new(DummyInfoProvider)
}