git.lucas.co / cce-status-interface
status bar
git clone https://git.lucas.co/cce-status-interface.git

commit1451e17eff8f4f7c5f1cfa6f80161ee3ef0d8725
parenta853cf311b
authorLucas Galante <[email protected]>
date2026-06-24 22:46
Rename tags to viewport and refactor parser to extract text from JSON

 src/main.rs    | 85 ++++++++++++++++++++++++++++++++------------------------
 src/modules.rs | 88 +++++++++++++++++++++++++++++-----------------------------
 2 files changed, 92 insertions(+), 81 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 4b4eb73..cd58087 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
 mod modules;
-use modules::{StatusModule, TagsModule, LayoutModule, TitleModule, ClockModule, BatteryModule, VolumeModule, BrightnessModule, MemoryModule, CpuModule, TrayModule};
+use modules::{StatusModule, ViewportModule, LayoutModule, TitleModule, ClockModule, BatteryModule, VolumeModule, BrightnessModule, MemoryModule, CpuModule, TrayModule};
 
 use std::collections::HashMap;
 use std::sync::Arc;
@@ -42,7 +42,7 @@ pub struct TrayIconBounds {
 }
 
 #[derive(Debug, Clone)]
-pub struct TagBounds {
+pub struct ViewportBounds {
     pub name: String,
     pub x: f32,
     pub y: f32,
@@ -82,7 +82,7 @@ impl std::fmt::Debug for StdinWriter {
 
 #[derive(Debug, Clone)]
 enum CustomEvent {
-    TagsUpdated(String),
+    ViewportUpdated(String),
     LayoutUpdated(String),
     TitleUpdated(String),
     ModifiersUpdated(String),
@@ -134,9 +134,15 @@ pub(crate) fn parse_hex_to_rgba(hex: &str) -> Option<[f32; 4]> {
     }
 }
 
-pub(crate) fn parse_tags(pango: &str) -> Vec<([f32; 4], String)> {
+pub(crate) fn parse_viewport_text(input: &str) -> Vec<([f32; 4], String)> {
+    let mut pango = input.to_string();
+    if let Ok(val) = serde_json::from_str::<serde_json::Value>(input) {
+        if let Some(t) = val.get("text").and_then(|v| v.as_str()) {
+            pango = t.to_string();
+        }
+    }
     let mut result = Vec::new();
-    let mut remaining = pango;
+    let mut remaining = pango.as_str();
     while let Some(start_span) = remaining.find("<span color='") {
         let color_start = start_span + "<span color='".len();
         if let Some(color_end) = remaining[color_start..].find("'") {
@@ -155,7 +161,6 @@ pub(crate) fn parse_tags(pango: &str) -> Vec<([f32; 4], String)> {
         }
     }
     if result.is_empty() && !pango.is_empty() {
-        // Fallback for plain text
         result.push(([0.8, 0.8, 0.8, 1.0], pango.to_string()));
     }
     result
@@ -270,7 +275,7 @@ pub struct ModuleBounds {
 
 struct StatusApp {
     // Status State
-    tags: String,
+    viewport: String,
     layout: String,
     title: String,
     stats: Option<SystemStats>,
@@ -278,7 +283,7 @@ struct StatusApp {
     cursor_pos: (f64, f64),
     hovered_tray_item: Option<String>,
     tray_item_bounds: Vec<TrayIconBounds>,
-    tag_bounds: Vec<TagBounds>,
+    viewport_bounds: Vec<ViewportBounds>,
     layout_bounds: Option<LayoutBounds>,
     active_cloud_pid: Option<u32>,
     active_cloud_source: Option<String>,
@@ -350,7 +355,7 @@ impl StatusApp {
             });
         }
 
-        self.tag_bounds.clear();
+        self.viewport_bounds.clear();
         self.layout_bounds = None;
 
         let mut left_x = 12.0;
@@ -358,7 +363,7 @@ impl StatusApp {
         for module in &left_modules {
             let w = module.width(
                 &self.stats,
-                &self.tags,
+                &self.viewport,
                 &self.layout,
                 &self.title,
                 &mut self.font_system,
@@ -400,7 +405,7 @@ impl StatusApp {
                     left_x,
                     w,
                     &self.stats,
-                    &self.tags,
+                    &self.viewport,
                     &self.layout,
                     &self.title,
                     &mut self.font_system,
@@ -412,7 +417,7 @@ impl StatusApp {
                     &mut self.text_items,
                     &mut self.rects,
                     &mut self.overlay_rects,
-                    &mut self.tag_bounds,
+                    &mut self.viewport_bounds,
                     &mut self.layout_bounds,
                     &self.tray_items,
                     &mut self.tray_item_bounds,
@@ -441,7 +446,7 @@ impl StatusApp {
         for module in right_modules.iter().rev() {
             let w = module.width(
                 &self.stats,
-                &self.tags,
+                &self.viewport,
                 &self.layout,
                 &self.title,
                 &mut self.font_system,
@@ -492,7 +497,7 @@ impl StatusApp {
                     right_x,
                     w,
                     &self.stats,
-                    &self.tags,
+                    &self.viewport,
                     &self.layout,
                     &self.title,
                     &mut self.font_system,
@@ -504,7 +509,7 @@ impl StatusApp {
                     &mut self.text_items,
                     &mut self.rects,
                     &mut self.overlay_rects,
-                    &mut self.tag_bounds,
+                    &mut self.viewport_bounds,
                     &mut self.layout_bounds,
                     &self.tray_items,
                     &mut self.tray_item_bounds,
@@ -894,7 +899,7 @@ impl StatusApp {
     }
 }
 
-fn get_closest_tag(x: f64, y: f64) -> i32 {
+fn get_closest_viewport(x: f64, y: f64) -> i32 {
     let centers = [(0.0, 0.0), (2000.0, 0.0), (0.0, 2000.0), (2000.0, 2000.0)];
     let mut min_dist = f64::MAX;
     let mut best_tag = 1;
@@ -910,15 +915,21 @@ fn get_closest_tag(x: f64, y: f64) -> i32 {
     best_tag
 }
 
-fn get_active_tag_from_camera(tags_json: &str) -> u32 {
-    if let Some(pan_idx) = tags_json.find("Pan: (") {
-        let coords_str = &tags_json[pan_idx + "Pan: (".len()..];
+fn get_active_viewport_from_camera(viewport_json: &str) -> u32 {
+    let mut text = viewport_json.to_string();
+    if let Ok(val) = serde_json::from_str::<serde_json::Value>(viewport_json) {
+        if let Some(t) = val.get("text").and_then(|v| v.as_str()) {
+            text = t.to_string();
+        }
+    }
+    if let Some(pan_idx) = text.find("Pan: (") {
+        let coords_str = &text[pan_idx + "Pan: (".len()..];
         if let Some(end_idx) = coords_str.find(")") {
             let parts: Vec<&str> = coords_str[..end_idx].split(',').collect();
             if parts.len() == 2 {
                 let pan_x = parts[0].trim().parse::<f64>().unwrap_or(0.0);
                 let pan_y = parts[1].trim().parse::<f64>().unwrap_or(0.0);
-                return get_closest_tag(pan_x, pan_y) as u32;
+                return get_closest_viewport(pan_x, pan_y) as u32;
             }
         }
     }
@@ -929,7 +940,7 @@ impl cce_ui::engine::Application for StatusApp {
     type Message = CustomEvent;
 
     fn new(_qh: &wayland_client::QueueHandle<cce_ui::engine::EngineState<Self>>, sender: calloop::channel::Sender<Self::Message>) -> Self {
-        let sender_tags = sender.clone();
+        let sender_viewport = sender.clone();
         let sender_layout = sender.clone();
         let sender_title = sender.clone();
         let sender_modifiers = sender.clone();
@@ -937,7 +948,7 @@ impl cce_ui::engine::Application for StatusApp {
         let sender_tray = sender.clone();
         let sender_switcher = sender.clone();
 
-        tokio::spawn(spawn_status_listener("tags", sender_tags));
+        tokio::spawn(spawn_status_listener("viewport", sender_viewport));
         tokio::spawn(spawn_status_listener("layout", sender_layout));
         tokio::spawn(spawn_status_listener("title", sender_title));
         tokio::spawn(spawn_status_listener("modifiers", sender_modifiers));
@@ -948,7 +959,7 @@ impl cce_ui::engine::Application for StatusApp {
         let font_system = FontSystem::new();
 
         let mut app = Self {
-            tags: String::new(),
+            viewport: String::new(),
             layout: String::new(),
             title: String::new(),
             stats: None,
@@ -956,7 +967,7 @@ impl cce_ui::engine::Application for StatusApp {
             cursor_pos: (0.0, 0.0),
             hovered_tray_item: None,
             tray_item_bounds: Vec::new(),
-            tag_bounds: Vec::new(),
+            viewport_bounds: Vec::new(),
             layout_bounds: None,
             active_cloud_pid: None,
             active_cloud_source: None,
@@ -978,7 +989,7 @@ impl cce_ui::engine::Application for StatusApp {
             dragged_module: None,
             module_bounds: Vec::new(),
             left_modules: vec![
-                Box::new(TagsModule),
+                Box::new(ViewportModule),
                 Box::new(LayoutModule),
                 Box::new(TitleModule),
             ],
@@ -1011,8 +1022,8 @@ impl cce_ui::engine::Application for StatusApp {
 
     fn update(&mut self, msg: Self::Message, needs_rebuild: &mut bool, _exit: &mut bool) {
         match msg {
-            CustomEvent::TagsUpdated(t) => {
-                self.tags = t;
+            CustomEvent::ViewportUpdated(t) => {
+                self.viewport = t;
             }
             CustomEvent::LayoutUpdated(l) => {
                 self.layout = l;
@@ -1339,7 +1350,7 @@ impl cce_ui::engine::Application for StatusApp {
             }
 
             if button == MouseButton::Left {
-                eprintln!("[tags-click] Mouse left click at logical: ({}, {})", cx, cy);
+                eprintln!("[viewport-click] Mouse left click at logical: ({}, {})", cx, cy);
                 
                 // Check if layout mode was clicked
                 let mut clicked_layout = false;
@@ -1424,10 +1435,10 @@ impl cce_ui::engine::Application for StatusApp {
                         self.active_cloud_pid = Some(pid);
                         eprintln!("[layout-click] Spawned clear-cloud with PID {}", pid);
                         
-                        let active_tag = get_active_tag_from_camera(&self.tags);
+                        let active_viewport = get_active_viewport_from_camera(&self.viewport);
                         let thread_sender = self.sender.clone();
                         std::thread::spawn(move || {
-                            eprintln!("[layout-click] Active tag is {}", active_tag);
+                            eprintln!("[layout-click] Active tag is {}", active_viewport);
                             if let Some(mut stdin) = child.stdin.take() {
                                 use std::io::Write;
                                 let _ = stdin.write_all(layout_json.as_bytes());
@@ -1453,9 +1464,9 @@ impl cce_ui::engine::Application for StatusApp {
                                                 .args(["apply-mode-sharing", &selected_mode])
                                                 .spawn();
                                         } else {
-                                            eprintln!("[layout-click] Selected mode: {}, setting for tag {}", selected_mode, active_tag);
+                                            eprintln!("[layout-click] Selected mode: {}, setting for tag {}", selected_mode, active_viewport);
                                             let _ = std::process::Command::new("clearctl")
-                                                .args(["tag-layout", &active_tag.to_string(), &selected_mode])
+                                                .args(["viewport-layout", &active_viewport.to_string(), &selected_mode])
                                                 .spawn();
                                         }
                                     } else {
@@ -1464,7 +1475,7 @@ impl cce_ui::engine::Application for StatusApp {
                                         if !selected.is_empty() {
                                             let selected_lower = selected.to_lowercase();
                                             let _ = std::process::Command::new("clearctl")
-                                                .args(["tag-layout", &active_tag.to_string(), &selected_lower])
+                                                .args(["viewport-layout", &active_viewport.to_string(), &selected_lower])
                                                 .spawn();
                                         }
                                     }
@@ -1488,12 +1499,12 @@ impl cce_ui::engine::Application for StatusApp {
                         eprintln!("[title-click] Title module clicked!");
                         self.trigger_switcher(false);
                     } else {
-                        for bound in &self.tag_bounds {
-                            eprintln!("[tags-click] Checking Tag '{}' bounds: x=[{}..{}], y=[{}..{}]", 
+                        for bound in &self.viewport_bounds {
+                            eprintln!("[viewport-click] Checking Viewport '{}' bounds: x=[{}..{}], y=[{}..{}]", 
                                 bound.name, bound.x, bound.x + bound.w, bound.y, bound.y + bound.h);
                             if cx >= bound.x as f64 && cx <= (bound.x + bound.w) as f64
                                 && cy >= bound.y as f64 && cy <= (bound.y + bound.h) as f64 {
-                                eprintln!("[tags-click] Tag matched: {}", bound.name);
+                                eprintln!("[viewport-click] Viewport matched: {}", bound.name);
                                 let name = bound.name.clone();
                                 std::thread::spawn(move || {
                                     let _ = std::process::Command::new("clearctl")
@@ -1533,7 +1544,7 @@ async fn spawn_status_listener(sub: &'static str, sender: calloop::channel::Send
                     eprintln!("[status-listener] received '{}' update: '{}'", sub, val);
                     if !val.is_empty() {
                         let ev = match sub {
-                            "tags" => CustomEvent::TagsUpdated(val.clone()),
+                            "viewport" => CustomEvent::ViewportUpdated(val.clone()),
                             "layout" => CustomEvent::LayoutUpdated(val.clone()),
                             "title" => CustomEvent::TitleUpdated(val.clone()),
                             "modifiers" => CustomEvent::ModifiersUpdated(val.clone()),
diff --git a/src/modules.rs b/src/modules.rs
index 89e1f49..163e99e 100644
--- a/src/modules.rs
+++ b/src/modules.rs
@@ -4,8 +4,8 @@ use cce_ui::color;
 use cce_ui::widget::{StyledLabel as Label, TextItem};
 
 use crate::{
-    RectWidget, RoundedBox, TagBounds, LayoutBounds, SystemStats, TrayItem,
-    TrayIconBounds, make_text_buffer, parse_tags,
+    RectWidget, RoundedBox, ViewportBounds, LayoutBounds, SystemStats, TrayItem,
+    TrayIconBounds, make_text_buffer, parse_viewport_text,
 };
 
 pub trait StatusModule {
@@ -16,7 +16,7 @@ pub trait StatusModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        tags: &str,
+        viewport: &str,
         layout: &str,
         title: &str,
         font_system: &mut FontSystem,
@@ -31,7 +31,7 @@ pub trait StatusModule {
         x: f32,
         w: f32,
         stats: &Option<SystemStats>,
-        tags: &str,
+        viewport: &str,
         layout: &str,
         title: &str,
         font_system: &mut FontSystem,
@@ -43,7 +43,7 @@ pub trait StatusModule {
         text_items: &mut Vec<TextItem>,
         rects: &mut Vec<RectWidget>,
         overlay_rects: &mut Vec<RectWidget>,
-        tag_bounds: &mut Vec<TagBounds>,
+        viewport_bounds: &mut Vec<ViewportBounds>,
         layout_bounds: &mut Option<LayoutBounds>,
         tray_items: &HashMap<String, TrayItem>,
         tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -54,17 +54,17 @@ pub trait StatusModule {
     );
 }
 
-pub struct TagsModule;
+pub struct ViewportModule;
 
-impl StatusModule for TagsModule {
-    fn name(&self) -> &'static str { "tags" }
+impl StatusModule for ViewportModule {
+    fn name(&self) -> &'static str { "viewport" }
     
     fn has_custom_background(&self) -> bool { true }
 
     fn width(
         &self,
         _stats: &Option<SystemStats>,
-        tags: &str,
+        viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -73,12 +73,12 @@ impl StatusModule for TagsModule {
         _tray_items: &HashMap<String, TrayItem>,
         padding: f32,
     ) -> f32 {
-        let tags_parsed = parse_tags(tags);
-        if tags_parsed.is_empty() {
+        let viewport_parsed = parse_viewport_text(viewport);
+        if viewport_parsed.is_empty() {
             0.0
         } else {
             let mut total_w = 0.0;
-            for (col, text) in &tags_parsed {
+            for (col, text) in &viewport_parsed {
                 let label = Label::new_with_family(font_system, text, font_size, *col, font_family);
                 total_w += label.w + 2.0 * padding + 4.0;
             }
@@ -91,7 +91,7 @@ impl StatusModule for TagsModule {
         x: f32,
         _w: f32,
         _stats: &Option<SystemStats>,
-        tags: &str,
+        viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -103,7 +103,7 @@ impl StatusModule for TagsModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        tag_bounds: &mut Vec<TagBounds>,
+        viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -112,9 +112,9 @@ impl StatusModule for TagsModule {
         rounded_boxes: &mut Vec<RoundedBox>,
         padding: f32,
     ) {
-        let tags_parsed = parse_tags(tags);
+        let viewport_parsed = parse_viewport_text(viewport);
         let mut cur_x = x;
-        for (col, text) in tags_parsed {
+        for (col, text) in viewport_parsed {
             let label = Label::new_with_family(font_system, &text, font_size, col, font_family);
             let box_w = label.w + 2.0 * padding;
             if let Some(color) = box_bg_color {
@@ -129,7 +129,7 @@ impl StatusModule for TagsModule {
                 });
             }
             label.draw(text_items, cur_x + padding, (bar_h - font_size * 1.4) / 2.0);
-            tag_bounds.push(TagBounds {
+            viewport_bounds.push(ViewportBounds {
                 name: text.clone(),
                 x: cur_x,
                 y: 0.0,
@@ -149,7 +149,7 @@ impl StatusModule for LayoutModule {
     fn width(
         &self,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -171,7 +171,7 @@ impl StatusModule for LayoutModule {
         x: f32,
         w: f32,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -183,7 +183,7 @@ impl StatusModule for LayoutModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -213,7 +213,7 @@ impl StatusModule for TitleModule {
     fn width(
         &self,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         title: &str,
         font_system: &mut FontSystem,
@@ -239,7 +239,7 @@ impl StatusModule for TitleModule {
         x: f32,
         _w: f32,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         title: &str,
         font_system: &mut FontSystem,
@@ -251,7 +251,7 @@ impl StatusModule for TitleModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -279,7 +279,7 @@ impl StatusModule for ClockModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -301,7 +301,7 @@ impl StatusModule for ClockModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -313,7 +313,7 @@ impl StatusModule for ClockModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -337,7 +337,7 @@ impl StatusModule for BatteryModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -363,7 +363,7 @@ impl StatusModule for BatteryModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -375,7 +375,7 @@ impl StatusModule for BatteryModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -406,7 +406,7 @@ impl StatusModule for VolumeModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -432,7 +432,7 @@ impl StatusModule for VolumeModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -444,7 +444,7 @@ impl StatusModule for VolumeModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -488,7 +488,7 @@ impl StatusModule for BrightnessModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -514,7 +514,7 @@ impl StatusModule for BrightnessModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -526,7 +526,7 @@ impl StatusModule for BrightnessModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -552,7 +552,7 @@ impl StatusModule for MemoryModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -574,7 +574,7 @@ impl StatusModule for MemoryModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -586,7 +586,7 @@ impl StatusModule for MemoryModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -610,7 +610,7 @@ impl StatusModule for CpuModule {
     fn width(
         &self,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -632,7 +632,7 @@ impl StatusModule for CpuModule {
         x: f32,
         _w: f32,
         stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -644,7 +644,7 @@ impl StatusModule for CpuModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         _overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         _tray_items: &HashMap<String, TrayItem>,
         _tray_item_bounds: &mut Vec<TrayIconBounds>,
@@ -668,7 +668,7 @@ impl StatusModule for TrayModule {
     fn width(
         &self,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         _font_system: &mut FontSystem,
@@ -690,7 +690,7 @@ impl StatusModule for TrayModule {
         x: f32,
         _w: f32,
         _stats: &Option<SystemStats>,
-        _tags: &str,
+        _viewport: &str,
         _layout: &str,
         _title: &str,
         font_system: &mut FontSystem,
@@ -702,7 +702,7 @@ impl StatusModule for TrayModule {
         text_items: &mut Vec<TextItem>,
         _rects: &mut Vec<RectWidget>,
         overlay_rects: &mut Vec<RectWidget>,
-        _tag_bounds: &mut Vec<TagBounds>,
+        _viewport_bounds: &mut Vec<ViewportBounds>,
         _layout_bounds: &mut Option<LayoutBounds>,
         tray_items: &HashMap<String, TrayItem>,
         tray_item_bounds: &mut Vec<TrayIconBounds>,