summaryrefslogtreecommitdiff
path: root/src/wm_info_provider.rs
diff options
context:
space:
mode:
authorBill Doyle <vil@vil.lv>2024-11-19 11:18:56 -0500
committerGitHub <noreply@github.com>2024-11-19 18:18:56 +0200
commiteaf5b67370f17f1fd9a3d4e7f62fdcd34f3d543c (patch)
tree227b4f392df603f86e347eaf358f76169f314460 /src/wm_info_provider.rs
parentcc5110a2cfcf5b20856171372fee8790c5b10469 (diff)
downloadi3bar-mango-eaf5b67370f17f1fd9a3d4e7f62fdcd34f3d543c.tar.gz
Add support for niri workspaces (#39)
Diffstat (limited to 'src/wm_info_provider.rs')
-rw-r--r--src/wm_info_provider.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wm_info_provider.rs b/src/wm_info_provider.rs
index a8ee3be..b3c6618 100644
--- a/src/wm_info_provider.rs
+++ b/src/wm_info_provider.rs
@@ -19,6 +19,9 @@ pub use river::*;
mod hyprland;
pub use hyprland::*;
+mod niri;
+pub use niri::*;
+
pub trait WmInfoProvider {
fn register(&self, _: &mut EventLoop) {}
@@ -62,6 +65,10 @@ pub fn bind(
return Box::new(hyprland);
}
+ if let Some(niri) = NiriInfoProvider::new() {
+ return Box::new(niri);
+ }
+
Box::new(DummyInfoProvider)
}