From e02e059008c7c5a723f5ef3d3823e232d28b01a3 Mon Sep 17 00:00:00 2001 From: jeremy <94247773+1jehuang@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:21:52 -0700 Subject: Make Chrome workspace bars red --- README.md | 2 +- src/main.rs | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 77b2afb..81f8057 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A fast, event-driven workspace indicator for [Waybar](https://github.com/Alexays - **Visual bars instead of numbers** — each window is rendered as a colored bar. - **Event-driven daemon mode** — keeps a persistent niri socket connection and emits JSON updates only when workspace/window state changes. -- **App-aware coloring** — built-in colors for Chrome, Firefox, Discord/Vesktop, Spotify, Todoist, Gmail, and terminals. +- **App-aware coloring** — built-in colors for Chrome (red), Firefox, Discord/Vesktop, Spotify, Todoist, Gmail, and terminals. - **Terminal app detection via `/proc`** — detects `jcode`, Claude, Codex, and Neovim/Vim running inside terminal windows. - **Terminal support** — works with Alacritty, Kitty, Ghostty, Foot, and Footclient. - **Focus semantics** — uses `█` for the focused window, `▌` for the active window on an unfocused workspace, and `|` for other windows. diff --git a/src/main.rs b/src/main.rs index e76831b..7eb4a5e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,7 +102,6 @@ fn output_status(workspaces: &[Workspace], windows: &[Window]) { let mut after_focused: Vec = Vec::new(); let mut focused_output = String::new(); let mut current_section = "before"; - let mut chrome_idx = 0; let mut tooltip = String::new(); for ws in &sorted_workspaces { @@ -150,12 +149,6 @@ fn output_status(workspaces: &[Workspace], windows: &[Window]) { let mut color = get_color(app_id, title, win.pid, &terminal_apps); let is_tmux = is_tmux_title(title); - if color == "chrome" { - const CHROME_COLORS: [&str; 4] = ["#ea4335", "#fbbc05", "#34a853", "#4285f4"]; - color = CHROME_COLORS[chrome_idx % 4].to_string(); - chrome_idx += 1; - } - if !ws.is_focused { color = dim_color(&color); } @@ -320,7 +313,7 @@ fn get_color( return "#98c379".to_string(); } if app_id == "google-chrome" || app_id.contains("chrome") { - return "chrome".to_string(); + return "#ea4335".to_string(); } if app_id == "firefox" { return "#ff7139".to_string(); -- cgit v1.3