summaryrefslogtreecommitdiff
path: root/src/wm_info_provider.rs
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2023-09-07 16:31:06 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2023-09-07 16:31:06 +0300
commit87673d7ecce661f3b8c5db949e70640934a55de9 (patch)
treeb2ac86792f42a0cf6bd7defc4f8bc86cddfc7988 /src/wm_info_provider.rs
parent74cc46a2383db5538d7e0392e4b79b7287775e9b (diff)
downloadi3bar-mango-87673d7ecce661f3b8c5db949e70640934a55de9.tar.gz
some refactoring
Diffstat (limited to 'src/wm_info_provider.rs')
-rw-r--r--src/wm_info_provider.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/wm_info_provider.rs b/src/wm_info_provider.rs
index e1004fa..25eef05 100644
--- a/src/wm_info_provider.rs
+++ b/src/wm_info_provider.rs
@@ -17,12 +17,18 @@ mod hyprland;
pub use hyprland::*;
pub trait WmInfoProvider {
- fn new_ouput(&mut self, conn: &mut Connection<State>, output: WlOutput);
- fn output_removed(&mut self, conn: &mut Connection<State>, output: WlOutput);
+ fn register(&self, _: &mut EventLoop) {}
+
+ fn new_ouput(&mut self, _: &mut Connection<State>, _: &Output) {}
+ fn output_removed(&mut self, _: &mut Connection<State>, _: &Output) {}
fn get_tags(&self, output: &Output) -> Vec<Tag>;
- fn get_layout_name(&self, output: &Output) -> Option<String>;
- fn get_mode_name(&self, output: &Output) -> Option<String>;
+ fn get_layout_name(&self, _: &Output) -> Option<String> {
+ None
+ }
+ fn get_mode_name(&self, _: &Output) -> Option<String> {
+ None
+ }
fn click_on_tag(
&mut self,
@@ -39,14 +45,13 @@ pub trait WmInfoProvider {
pub fn bind(
conn: &mut Connection<State>,
globals: &Globals,
- event_loop: &mut EventLoop<(Connection<State>, State)>,
config: &WmConfig,
) -> Option<Box<dyn WmInfoProvider>> {
if let Some(river) = RiverInfoProvider::bind(conn, globals, config) {
return Some(Box::new(river));
}
- if let Some(hyprland) = Hyprland::new(event_loop) {
+ if let Some(hyprland) = Hyprland::new() {
return Some(Box::new(hyprland));
}