From 85652bd0b3559fe184735e4f5adc5dac6848e2d6 Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Wed, 19 Aug 2026 14:22:21 -0400 Subject: [PATCH] Fix theme swatches, bar sizing, and show 9 workspaces Claude-Session: https://claude.ai/code/session_014ADhvRXuiTvrXSbConxUey --- ags/style.css | 30 +++++++- ags/widget/ClaudeUsage.tsx | 20 +++--- ags/widget/ThemePicker.tsx | 11 ++- install.sh | 2 + omarchy/README.md | 14 +++- .../plugins/blob.workspaces/Workspaces.qml | 72 +++++++++++++++++++ omarchy/plugins/blob.workspaces/manifest.json | 23 ++++++ omarchy/shell.json | 2 +- revert.sh | 1 + 9 files changed, 161 insertions(+), 14 deletions(-) create mode 100644 omarchy/plugins/blob.workspaces/Workspaces.qml create mode 100644 omarchy/plugins/blob.workspaces/manifest.json diff --git a/ags/style.css b/ags/style.css index 18b157a..4a915d5 100644 --- a/ags/style.css +++ b/ags/style.css @@ -491,9 +491,11 @@ } .agent-mark { - color: @accent; - font-size: 20px; min-width: 26px; + min-height: 26px; + background-size: contain; + background-repeat: no-repeat; + background-position: center; } .agent-name { @@ -541,14 +543,27 @@ .agent-limit-bar trough, .agent-day-bar trough { min-height: 3px; + border-radius: 0; background-color: alpha(@foreground, 0.14); } +.agent-limit-bar block, +.agent-day-bar block { + min-height: 3px; + min-width: 0; + border-radius: 0; +} + .agent-limit-bar block.filled, .agent-day-bar block.filled { background-color: @foreground; } +.agent-limit-bar block.empty, +.agent-day-bar block.empty { + background-color: transparent; +} + .agent-day-row { padding: 1px 0; } @@ -578,13 +593,24 @@ .agent-model-bar trough { min-height: 22px; + border-radius: 0; background-color: alpha(@foreground, 0.08); } +.agent-model-bar block { + min-height: 22px; + min-width: 0; + border-radius: 0; +} + .agent-model-bar block.filled { background-color: alpha(@foreground, 0.18); } +.agent-model-bar block.empty { + background-color: transparent; +} + .agent-model-text { padding: 0 8px; } diff --git a/ags/widget/ClaudeUsage.tsx b/ags/widget/ClaudeUsage.tsx index 16b06e4..7265e4d 100644 --- a/ags/widget/ClaudeUsage.tsx +++ b/ags/widget/ClaudeUsage.tsx @@ -51,9 +51,11 @@ const EMPTY_USAGE: AgentUsage = { const WEEKDAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] +const MARK_PATH = "/usr/share/omarchy/shell/plugins/agents/assets/claude.svg" + function formatTokens(tokens: number) { - if (tokens >= 1000000000) return `${(tokens / 1000000000).toFixed(2)}B` - if (tokens >= 1000000) return `${(tokens / 1000000).toFixed(2)}M` + if (tokens >= 1000000000) return `${(tokens / 1000000000).toFixed(1)}B` + if (tokens >= 1000000) return `${(tokens / 1000000).toFixed(1)}M` if (tokens >= 1000) return `${(tokens / 1000).toFixed(1)}K` return `${Math.round(tokens)}` } @@ -87,20 +89,20 @@ function formatModelName(model: string) { .replace(/(^| )(\w)/g, (_match, space, letter) => `${space}${letter.toUpperCase()}`) } -function formatPercent(percent: number) { - if (percent > 0 && percent < 1) return "<1%" - return `${Math.round(percent)}%` +function formatPercent(usedFraction: number) { + if (usedFraction > 0 && usedFraction < 0.01) return "<1%" + return `${Math.round(usedFraction * 100)}%` } function parseLimits(record: any): Limit[] { if (!Array.isArray(record.limits)) return [] return record.limits.map((limit: any) => { - const percent = Number(limit.percent) || 0 + const usedFraction = Number(limit.percent) || 0 return { label: String(limit.label ?? "").replace(/\s*\(.*\)$/, ""), - percent, - fraction: Math.min(1, Math.max(0, percent / 100)), + percent: usedFraction, + fraction: Math.min(1, Math.max(0, usedFraction)), resetsIn: formatResetsIn(String(limit.resetsAt ?? "")), } }) @@ -253,7 +255,7 @@ export function ClaudeUsageCard() { return ( -