summaryrefslogtreecommitdiff
path: root/src/button_manager.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/button_manager.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/button_manager.rs')
-rw-r--r--src/button_manager.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/button_manager.rs b/src/button_manager.rs
index 13f9124..9915460 100644
--- a/src/button_manager.rs
+++ b/src/button_manager.rs
@@ -1,6 +1,12 @@
-#[derive(Debug, Default)]
+#[derive(Debug)]
pub struct ButtonManager<T = usize>(Vec<(f64, f64, T)>);
+impl<T> Default for ButtonManager<T> {
+ fn default() -> Self {
+ Self(Vec::new())
+ }
+}
+
impl<T> ButtonManager<T> {
pub fn push(&mut self, x_offset: f64, width: f64, elem: T) {
self.0.push((x_offset, width, elem));