diff --git a/ags/style.css b/ags/style.css index 4a915d5..b858292 100644 --- a/ags/style.css +++ b/ags/style.css @@ -587,32 +587,9 @@ color: @foreground; } -.agent-model-bar { +.agent-model-row { min-height: 22px; -} - -.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; + padding: 3px 8px; } .agent-model-label { @@ -713,11 +690,25 @@ } .cc-calendar-month { - font-size: 13px; + font-size: 15px; font-weight: bold; color: @accent; } +.cc-calendar-nav { + color: @foreground; + font-size: 13px; + min-width: 24px; + padding: 2px 4px; + background-color: transparent; + border: none; +} + +.cc-calendar-nav:hover { + color: @accent; + background-color: alpha(@foreground, 0.1); +} + .cc-calendar-time { font-size: 13px; color: @foreground; @@ -725,6 +716,7 @@ .cc-calendar-grid { font-family: "JetBrainsMono Nerd Font", monospace; - font-size: 13px; + font-size: 17px; color: @foreground; + padding: 4px 2px; } diff --git a/ags/widget/ClaudeUsage.tsx b/ags/widget/ClaudeUsage.tsx index 7265e4d..d046919 100644 --- a/ags/widget/ClaudeUsage.tsx +++ b/ags/widget/ClaudeUsage.tsx @@ -236,18 +236,14 @@ function DayRow({ day }: { day: DayUsage }) { } function ModelRow({ model }: { model: ModelUsage }) { + const fillPercent = Math.round(model.fraction * 100) + const fill = `linear-gradient(to right, alpha(@foreground, 0.18) ${fillPercent}%, alpha(@foreground, 0.06) ${fillPercent}%)` + return ( - - + + ) } diff --git a/ags/widget/QuickSettings.tsx b/ags/widget/QuickSettings.tsx index 97baea5..4cdf35b 100644 --- a/ags/widget/QuickSettings.tsx +++ b/ags/widget/QuickSettings.tsx @@ -1,5 +1,5 @@ import app from "ags/gtk3/app" -import { Astal, Gtk } from "ags/gtk3" +import { Astal, Gdk, Gtk } from "ags/gtk3" import { createState } from "ags" import { createPoll, interval } from "ags/time" import { sh, shell } from "../lib/utils" @@ -52,6 +52,21 @@ const [nightLight, setNightLight] = pollBool( 2000, ) +const [stayAwake, setStayAwake] = pollBool( + "omarchy-toggle-idle status 2>/dev/null | grep -q '\"enabled\":true' && echo on || echo off", + 2000, +) + +const [dictating] = pollBool( + "omarchy-voxtype-status 2>/dev/null | grep -q recording && echo on || echo off", + 2000, +) + +const [recording] = pollBool( + "pgrep -f '^gpu-screen-recorder' >/dev/null && echo on || echo off", + 2000, +) + const clock = createPoll("", 1000, shell("date '+%H:%M'"), (stdout) => stdout.trim()) const today = createPoll("", 10000, shell("date '+%A, %B %-d'"), (stdout) => stdout.trim()) @@ -109,16 +124,19 @@ function Tile({ icon, label, active, + tooltip, onClicked, }: { icon: string label: string active?: any + tooltip?: any onClicked: () => void }) { return ( - - @@ -307,22 +355,75 @@ function MediaPlayer() { ) } -const monthName = createPoll("", 60000, shell("date '+%B %Y'"), (stdout) => stdout.trim()) -const monthGrid = createPoll( - "", - 60000, - shell("cal | sed '1d'"), - (stdout) => stdout.replace(/\s+$/, ""), -) +const [monthOffset, setMonthOffset] = createState(0) +const [monthName, setMonthName] = createState("") +const [monthGrid, setMonthGrid] = createState("") + +const loadMonth = (offset: number) => { + const firstOfMonth = `$(date +%Y-%m-01) ${offset} months` + const command = + `date -d "${firstOfMonth}" '+%B %Y'; ` + + `cal $(date -d "${firstOfMonth}" '+%m %Y') | sed '1d'` + + sh(command).then((stdout) => { + const lines = String(stdout).replace(/\s+$/, "").split("\n") + setMonthName(lines[0]?.trim() ?? "") + setMonthGrid(lines.slice(1).join("\n")) + }) +} + +const shiftMonth = (delta: number) => { + const next = monthOffset.get() + delta + setMonthOffset(next) + loadMonth(next) +} + +const resetMonth = () => { + setMonthOffset(0) + loadMonth(0) +} + +loadMonth(0) +interval(3600000, () => { if (monthOffset.get() === 0) loadMonth(0) }) function CalendarSection() { return ( - - - + ) } diff --git a/ags/widget/SysMonitor.tsx b/ags/widget/SysMonitor.tsx index 5399773..05400fd 100644 --- a/ags/widget/SysMonitor.tsx +++ b/ags/widget/SysMonitor.tsx @@ -75,7 +75,12 @@ function Metric({ detail: any }) { return ( - + `${name}: ${value}`)} + >