summaryrefslogtreecommitdiff
path: root/src/river_protocols
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2022-08-25 09:18:56 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2022-08-25 16:34:15 +0300
commitb154262dcbf0d1a5686921f24eb0b0c41ed95f29 (patch)
treecf1695a7b6dd997463e3a024d34902dad459e9ca /src/river_protocols
parent2d77969c7719e72237ec365c3db9e35c3e178631 (diff)
downloadi3bar-mango-b154262dcbf0d1a5686921f24eb0b0c41ed95f29.tar.gz
feat: add hide_inactive_tags option
Diffstat (limited to 'src/river_protocols')
-rw-r--r--src/river_protocols/status.rs8
-rw-r--r--src/river_protocols/status/dispatch.rs8
2 files changed, 15 insertions, 1 deletions
diff --git a/src/river_protocols/status.rs b/src/river_protocols/status.rs
index 50c85e0..f19ac5f 100644
--- a/src/river_protocols/status.rs
+++ b/src/river_protocols/status.rs
@@ -96,6 +96,14 @@ pub trait RiverStatusHandler: Sized {
output_status: &RiverOutputStatus,
urgent: u32,
);
+
+ fn views_tags_updated(
+ &mut self,
+ conn: &Connection,
+ qh: &QueueHandle<Self>,
+ output_status: &RiverOutputStatus,
+ tags: Vec<u32>,
+ );
}
#[derive(Debug, Clone)]
diff --git a/src/river_protocols/status/dispatch.rs b/src/river_protocols/status/dispatch.rs
index d38037d..65d6e0c 100644
--- a/src/river_protocols/status/dispatch.rs
+++ b/src/river_protocols/status/dispatch.rs
@@ -79,7 +79,13 @@ where
match event {
Event::FocusedTags { tags } => data.focused_tags_updated(conn, qh, &status, tags),
Event::UrgentTags { tags } => data.urgent_tags_updated(conn, qh, &status, tags),
- Event::ViewTags { tags: _ } => (),
+ Event::ViewTags { tags } => {
+ let tags = tags
+ .chunks_exact(4)
+ .map(|bytes| u32::from_ne_bytes(bytes.try_into().unwrap()))
+ .collect();
+ data.views_tags_updated(conn, qh, &status, tags);
+ }
}
}
}