diff options
| author | ryukamish <[email protected]> | 2026-04-11 23:58:52 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-04-11 23:58:52 +0530 |
| commit | 06240ac1f6b302f67c3c451dc5cba3db9a6fb659 (patch) | |
| tree | 3e7428d2de59b2343903b031bd212d4d4950e0c4 /src/main.rs | |
| parent | 60571fbceda11191d058a7a61aae103e776abd0e (diff) | |
add: workspace number on the left of the indicator
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 7eb4a5e..642b2dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,10 +134,16 @@ fn output_status(workspaces: &[Workspace], windows: &[Window]) { let ws_output = if win_count == 0 { // Empty but focused - just show a dot, no name - "<span color='#888888'>·</span>".to_string() + // "<span color='#888888'>·</span>".to_string() + format!("{} <span color='#888888'>.</span>", ws.idx) } else { let mut output = String::new(); + // Always show the workspace number on the left + if ws.is_focused { + output.push_str(&format!("{} ", ws.idx)); + } + // Show workspace name only when focused if has_custom_name && ws.is_focused { output.push_str(&format!("<span color='#cccccc'>{}</span> ", ws_name)); @@ -154,7 +160,7 @@ fn output_status(workspaces: &[Workspace], windows: &[Window]) { } let mut bar = if win.is_focused { - "█" + "<span color='#ffa500'>█</span>" } else if !ws.is_focused && ws.active_window_id == Some(win.id) { "▌" } else { @@ -166,6 +172,7 @@ fn output_status(workspaces: &[Workspace], windows: &[Window]) { bar = "¦"; } + // output.push_str(&format!("<span color='{}'>{}</span>", color, bar)); output.push_str(&format!("<span color='{}'>{}</span>", color, bar)); } output |
