deskbar
A desk for the Claude Code prompt: context weather, Gmail, calendar, tasks across sessions, notes, a music deck and a billable-hours timer
What it does
- Draws a band above the prompt, a pane, toasts
- Adds /desk, /weather, /timer
- Watches tool calls
- Hooks prompt.context, prompt.submit, session.start, turn.complete and 2 more
- Keeps its own state between turns
Good points
- No network calls
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like deskbar by 0NE-C0DEMAN (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/0ne-c0deman-deskbar/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Client, Button, Svg, Text } = $.ui.resolve(e)
const source = '…'
const label = '…'
const about = '…'
const meterSvg = '…'
const unbilled = '…'
const money = '…'
const currency = '…'
const expenses = '…'
const dayName = '…'
return (
<Box flexDirection="column" width="100%">
<Box width="100%" justifyContent="space-between" alignItems="center">
92
<Box alignItems="center">
<Box alignItems="center">
<Box marginRight={1} alignItems="center">
<Client module="./pulse.tsx" width={1} height={1} />
</Box>
<Box position="relative" alignItems="center">
<Button label=" ▾" />
<Box position="absolute" top={0} left={1} height="100%" alignItems="center">
<Svg source={`${source}`} alt="timer" width={20} height={20} />
</Box>
</Box>
<Box marginLeft={1} alignItems="center">
<Box position="relative" alignItems="center">
<Button label={` ${label}`} />
<Box position="absolute" top={0} left={1} height="100%" alignItems="center">
<Svg source={`${source}`} alt="stop" width={20} height={20} />
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" width="100%" marginTop={1}>
<Box width="100%" justifyContent="space-between" paddingX={1}>
<Box alignItems="center">
<Text color="#8fa3aa">
{about}
</Text>
<Text color="#8fa3aa">
{" week "}
</Text>
<Client module="./meter.tsx" width={8} height={1} />
<Svg source={`${meterSvg}`} alt="this week against the cap" width={56} height={10} />
</Box>
<Box>
<Text color="#8fa3aa">
{"Unbilled "}
</Text>
<Text bold>
{unbilled}
{" h"}
{money}
</Text>
<Text color="#8fa3aa">
{` · expenses ${currency}${expenses}`}
</Text>
</Box>
</Box>
<Box width="100%" columnGap={1}>
<Box flexDirection="column" flexGrow={1} borderStyle="round" borderColor="#2f4149">
<Box paddingX={1}>
<Text bold>
{`Today, ${dayName}`}
</Text>
</Box>
<Box paddingX={1} backgroundColor="#22333b">
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" flexGrow={1} borderStyle="round" borderColor="#2f4149">
<Box paddingX={1}>
<Text bold>
This week
</Text>
</Box>
<Box paddingX={1} backgroundColor="#22333b">
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
</Box>
</Box>
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Timer" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Client, Svg } = $.ui.resolve(e)
const pill = '…'
const hms = '…'
const about = '…'
const meterSvg = '…'
const unbilled = '…'
const money = '…'
const currency = '…'
const expenses = '…'
const dayName = '…'
return (
<Box flexDirection="column">
<Text bold>
{"● "}
{pill}
</Text>
<Text bold>
{hms}
</Text>
<Text>
No timer running
</Text>
<Box>
<Button label="Stop" />
<Button label="Resume last" />
<Text>
{" "}
</Text>
<Button label="Collapse" />
</Box>
<Box flexDirection="column" width="100%" marginTop={1}>
<Box width="100%" justifyContent="space-between" paddingX={1}>
<Box alignItems="center">
<Text color="#8fa3aa">
{about}
</Text>
<Text color="#8fa3aa">
{" week "}
</Text>
<Client module="./meter.tsx" width={8} height={1} />
<Svg source={`${meterSvg}`} alt="this week against the cap" width={56} height={10} />
</Box>
<Box>
<Text color="#8fa3aa">
{"Unbilled "}
</Text>
<Text bold>
{unbilled}
{" h"}
{money}
</Text>
<Text color="#8fa3aa">
{` · expenses ${currency}${expenses}`}
</Text>
</Box>
</Box>
<Box width="100%" columnGap={1}>
<Box flexDirection="column" flexGrow={1} borderStyle="round" borderColor="#2f4149">
<Box paddingX={1}>
<Text bold>
{`Today, ${dayName}`}
</Text>
</Box>
<Box paddingX={1} backgroundColor="#22333b">
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" flexGrow={1} borderStyle="round" borderColor="#2f4149">
<Box paddingX={1}>
<Text bold>
This week
</Text>
</Box>
<Box paddingX={1} backgroundColor="#22333b">
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2}>
<Text color="#1baf7a">
{" "}
</Text>
</Box>
</Box>
<Box paddingX={1}>
<Box flexGrow={1} justifyContent="flex-end" paddingRight={2} />
</Box>
</Box>
</Box>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const title = '…'
const when = '…'
await $.ui.toast(`No time found in that, so Claude will add it`)
await $.ui.toast(`Added: ${title}, ${when}`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/desk.tsx lines 2372–2380 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const below = await next(e)
try {
return await band($, e, below)
} catch {
return below
}
})hooks/timer.tsx lines 829–934 · Band
async function band($: EngineInterface, e: any, below: any): Promise<any> {
{
const s = await read($, snap)
if (isUnattended || !deskOn || e.props.hasSurvey || s === null || (await read($, isHidden))) {
return below
}
const table = $.ui.resolve(e)
const { Box, Button, Text } = table
// The terminal cannot paint an SVG: it keeps a dot.
const Svg = e.surface === 'terminal' ? undefined : (table as { Svg?: any }).Svg
// surface modules run in the terminal; elsewhere the motion is an SVG that animates by itself
const Client = e.surface === 'terminal' || hasDesktopModules ? (table as { Client?: any }).Client : undefined
const v = view(s)
const run = s.running
const open = await isShown($)
const clock = run === null ? `${v.today.toFixed(2)}h` : hms(v.net)
// The stopwatch's hand points at the running second, so it ticks round
// the dial once a minute as the band redraws; at rest it points up.
const angle = run === null ? 0 : (Math.floor(v.net) % 60) * 6
const stopwatch = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M9.5 2h5M12 2v3M18.5 6.5l1.5-1.5" fill="none" stroke="${v.color}" stroke-width="2.2" stroke-linecap="round"/><circle cx="12" cy="14" r="8.5" fill="${v.color}"/><circle cx="12" cy="14" r="6.2" fill="#10181c"/><path d="M12 14V9.4" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" transform="rotate(${angle} 12 14)"/><circle cx="12" cy="14" r="1.3" fill="#ffffff"/></svg>`
// Start is a green tile with a play mark, stop a red one with a square.
const tile = (fill: string, mark: string) =>
`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="6" fill="${fill}"/>${mark}</svg>`
const playTile = tile('#1baf7a', '<path d="M9.5 7.2v9.6a.6.6 0 0 0 .92.5l7.2-4.8a.6.6 0 0 0 0-1l-7.2-4.8a.6.6 0 0 0-.92.5z" fill="#ffffff"/>')
const stopTile = tile('#e34948', '<rect x="7.5" y="7.5" width="9" height="9" rx="1.8" fill="#ffffff"/>')
// A chip as the desk row draws its own: the icon painted over the left of
// a button, whose label (the part that takes the click) follows it.
const iconChip = (key: string, source: string, alt: string, label: string, onPress: () => unknown) => (
<Box position="relative" alignItems="center">
<Button key={key} label={` ${label}`} onPress={onPress} />
<Box position="absolute" top={0} left={1} height="100%" alignItems="center">
<Svg source={source} alt={alt} width={20} height={20} />
</Box>
</Box>
)
// The chip at the right end of the band: the stopwatch with the arrow that
// opens the table, then start (green) or stop (red) with the clock beside
// it. Nothing appears on hover; the task is in the table the arrow opens.
const chip = (
<Box key="timer-chip" alignItems="center">
{Svg === undefined ? (
<Box alignItems="center">
<Text bold color={v.color}>
● {clock}{' '}
</Text>
{run !== null && <Button key="stop" label="■ Stop" onPress={() => pressStop($)} />}
{run === null && <Button key="resume" label="▶ Start" onPress={() => pressResume($)} />}
<Text> </Text>
<Button key="toggle" label={open ? '▾' : '▸'} onPress={() => pressToggle($)} />
</Box>
) : (
<Box alignItems="center">
{/* a breathing dot while the timer records */}
{run !== null && (
<Box marginRight={1} alignItems="center">
{Client !== undefined ? (
<Client key="timer-pulse" module="./pulse.tsx" props={{ tint: v.color }} width={1} height={1} />
) : (
<Svg source={pulseSvg(v.color, false)} alt="recording" width={12} height={12} />
)}
</Box>
)}
{iconChip('toggle', stopwatch, 'timer', open ? '▾' : '▸', () => pressToggle($))}
<Box marginLeft={1} alignItems="center">
{run !== null
? iconChip('stop', stopTile, 'stop', clock, () => pressStop($))
: iconChip('resume', playTile, 'start', clock, () => pressResume($))}
</Box>
</Box>
)}
</Box>
)
// What sits beneath (the desk row): a row, or a column of its row and a
// dropdown. The chip joins that row at the right; the rest stays below.
const isColumn = below.type !== 'engine' && (below as { props?: { flexDirection?: string } }).props?.flexDirection === 'column'
const kids = isColumn ? ((below as { children?: unknown[] }).children ?? []) : []
const left = below.type === 'engine' ? undefined : isColumn ? kids[0] : below
const rest = kids.slice(1)
const top =
left === undefined ? (
<Box width="100%" justifyContent="flex-end">
{chip}
</Box>
) : (
<Box width="100%" justifyContent="space-between" alignItems="center">
{left}
{chip}
</Box>
)
if (!open && rest.length === 0) {
return top
}
return (
<Box flexDirection="column" width="100%">
{top}
{rest}
{open && details(Box, Text, s, Math.max(3, (Number(e.props.maxRows) || 12) - 8), (Number(e.props.bodyColumns) || 96) < 84, Client, Svg)}
</Box>
)
}
}hooks/timer.tsx lines 706–816 · Band
function details(Box: any, Text: any, s: Snap, rows = 20, isNarrow = false, Client?: any, Svg?: any) {
const v = view(s)
const run = s.running
const top = Math.max(...s.week.map(d => d.hours), v.today, 0.01)
const today = localIso(s.nowMs, s.offset).slice(0, 10)
const cost = (hours: number) => (s.rate > 0 ? `${s.currency}${(hours * s.rate).toFixed(2)}` : '')
const todayLines: Line[] = s.today.slice(-Math.max(1, Math.min(8, rows - (s.running === null ? 1 : 2)))).map(e => ({
cells: [e.from === '' ? 'added' : `${e.from} - ${e.to}`, e.hours.toFixed(2), e.billable ? cost(e.hours) : 'call', clip(e.task, 40)],
look: e.billable ? {} : { dimColor: true },
}))
if (run !== null) {
todayLines.push({
cells: [`${run.start.slice(11, 16)} - now`, (v.net / 3600).toFixed(2), run.billable ? cost(v.net / 3600) : 'call', clip(run.task, 40)],
look: { color: v.color, bold: true },
})
}
if (todayLines.length === 0) {
todayLines.push({ cells: ['nothing logged yet', '', '', ''], look: { dimColor: true } })
}
todayLines.push({ cells: ['Total', v.today.toFixed(2), cost(v.today), ''], look: { bold: true }, bg: TOTAL_BG })
const weekLines: Line[] = s.week
// when rows are short, only the days that have hours, the latest kept
.filter(day => rows >= 8 || day.hours > 0 || day.date === today)
.slice(-Math.max(1, rows - 1))
.map(day => {
const hours = day.hours + (day.date === today ? v.live : 0)
const isToday = day.date === today
return {
cells: [dayName(day.date), hours === 0 ? '-' : hours.toFixed(2), hours === 0 ? '' : cost(hours), ''],
look: hours === 0 ? { dimColor: true } : isToday ? { bold: true, color: GREEN } : {},
bar: hours > 0 ? Math.max(1, Math.round((hours / top) * 12)) : 0,
}
})
const left = s.cap > 0 ? (v.isOver ? `over the ${s.cap} h cap` : `${Math.max(0, s.cap - v.week).toFixed(2)} h left of ${s.cap}`) : ''
weekLines.push({
cells: ['Total', v.week.toFixed(2), cost(v.week), left],
look: { bold: true, color: v.isOver ? AMBER : undefined },
bg: TOTAL_BG,
})
const idle = run !== null && run.idle > 0 ? `, idle ${hms(run.idle)} not counted` : ''
const about =
run === null
? s.last === null
? s.client
: `${s.client} · last entry ended ${s.last.end.slice(11, 16)}, ${dayName(s.last.end)}`
: `${s.client} · started ${run.start.slice(11, 16)}${idle}`
const unbilled = s.unbilledHours + v.live
return (
<Box flexDirection="column" width="100%" marginTop={1}>
<Box width="100%" justifyContent="space-between" paddingX={1}>
<Box alignItems="center">
<Text color={MUTED}>{about}</Text>
{/* the week against its cap: a bar that glides, and sweeps while the timer runs */}
{(Client !== undefined || Svg !== undefined) && s.cap > 0 && <Text color={MUTED}>{' week '}</Text>}
{Client !== undefined && s.cap > 0 && (
<Client
key="week-meter"
module="./meter.tsx"
props={{ value: v.week / s.cap, active: run !== null && run.billable, tint: v.isOver ? AMBER : GREEN }}
width={isNarrow ? 8 : 14}
height={1}
/>
)}
{Client === undefined && Svg !== undefined && s.cap > 0 && (
<Svg
source={meterSvg(v.week / s.cap, run !== null && run.billable, v.isOver ? AMBER : GREEN, isNarrow ? 56 : 98)}
alt="this week against the cap"
width={isNarrow ? 56 : 98}
height={10}
/>
)}
</Box>
<Box>
<Text color={MUTED}>Unbilled </Text>
<Text bold>
{unbilled.toFixed(2)} h{money(unbilled, s)}
</Text>
<Text color={MUTED}>
{s.unbilledFrom === '' ? '' : ` since ${dayName(s.unbilledFrom)}`}
{s.expenses > 0 ? ` · expenses ${s.currency}${s.expenses.toFixed(2)}` : ''}
</Text>
</Box>
</Box>
{isNarrow ? (
// too narrow for two cards side by side: today's, and the week as a line
<Box flexDirection="column" width="100%">
{card(Box, Text, `Today, ${dayName(today)}`, ['Time', 'Hours', 'Amount', 'Task'], todayLines.slice(-Math.max(2, rows - 1)), [14, 7, 9])}
<Box paddingX={1}>
<Text bold color={v.isOver ? AMBER : GREEN}>
This week {v.week.toFixed(2)} h{cost(v.week) === '' ? '' : ` ${cost(v.week)}`}
</Text>
<Text color={MUTED}>{left === '' ? '' : ` ${left}`}</Text>
</Box>
</Box>
) : (
<Box width="100%" columnGap={1}>
{card(Box, Text, `Today, ${dayName(today)}`, ['Time', 'Hours', 'Amount', 'Task'], todayLines, [15, 9, 11])}
{card(Box, Text, 'This week', ['Day', 'Hours', 'Amount', left === '' ? '' : 'Share'], weekLines, [13, 9, 11])}
</Box>
)}
</Box>
)
}hooks/timer.tsx lines 665–702 · Band
function card(Box: any, Text: any, title: string, head: string[], lines: Line[], widths: number[]) {
const cells = (line: Line, isHead: boolean) =>
line.cells.map((text, c) => {
const isNumber = c === 1 || c === 2
const look = isHead ? { bold: true, color: MUTED } : (line.look ?? {})
return (
<Box
width={widths[c]}
flexGrow={widths[c] === undefined ? 1 : 0}
justifyContent={isNumber ? 'flex-end' : 'flex-start'}
paddingRight={isNumber ? 2 : 0}
>
{line.bar !== undefined && c === line.cells.length - 1 ? (
<Text color={GREEN}>{line.bar === 0 ? ' ' : '▇'.repeat(line.bar)}</Text>
) : (
<Text {...look}>{text === '' ? ' ' : text}</Text>
)}
</Box>
)
})
return (
<Box flexDirection="column" flexGrow={1} borderStyle="round" borderColor={EDGE}>
<Box paddingX={1}>
<Text bold>{title}</Text>
</Box>
<Box paddingX={1} backgroundColor={HEAD_BG}>
{cells({ cells: head }, true)}
</Box>
{lines.map((line, r) => (
<Box paddingX={1} backgroundColor={line.bg ?? (r % 2 === 1 ? STRIPE_BG : undefined)}>
{cells(line, false)}
</Box>
))}
</Box>
)
}hooks/timer.tsx lines 1024–1071 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
const s = await read($, snap)
if (s === null) {
return <Text dimColor>No timelog in this project. /timer setup starts one.</Text>
}
const v = view(s)
const run = s.running
const wide = await read($, isOpen)
// Slim: a narrow strip on the edge of the chat. Open: the whole breakdown.
if (!wide) {
return (
<Box flexDirection="column">
<Text bold color={v.color}>
● {run === null ? 'Off' : run.billable ? 'On' : 'Call'}
</Text>
<Text bold>{hms(v.net)}</Text>
<Text dimColor>{v.today.toFixed(2)}h today</Text>
<Text dimColor>
{v.week.toFixed(1)}
{s.cap > 0 ? `/${s.cap}` : ''}h week
</Text>
{run !== null && <Button key="pane-stop" label="Stop" onPress={() => pressStop($)} />}
<Button key="expand" label="Open" onPress={() => setWide($, true)} />
</Box>
)
}
return (
<Box flexDirection="column">
<Text bold color={v.color}>
● {v.pill}
</Text>
<Text bold>{hms(v.net)}</Text>
<Text>{run === null ? 'No timer running' : run.task}</Text>
<Box>
{run !== null && <Button key="pane-stop" label="Stop" onPress={() => pressStop($)} />}
{run === null && s.last !== null && <Button key="pane-resume" label="Resume last" onPress={() => pressResume($)} />}
<Text> </Text>
<Button key="collapse" label="Collapse" onPress={() => setWide($, false)} />
</Box>
{details(Box, Text, s)}
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 0NE-C0DEMAN Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
runs programswrites filesenv varsdrives Claudetool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit cd22818a1c91 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.7 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.its repository's .claude-plugin/marketplace.json does not list it: no install line to give |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/desk.tsx:1029 a program named at run time; hooks/desk.tsx:1084 cmd (a shell or interpreter); hooks/timer.tsx:457 python (a shell or interpreter) |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository's .claude-plugin/marketplace.json does not list it, so there is no install line to give. Read it as code, or follow its author's README.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "0ne-c0deman-deskbar" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…Notes⚠ A team of Never uses your Claude usage much faster.Showing:buildbuildbuildHide completed:buildbuildbuildSet team size:DefaultDefaultDefaultSet model:NotesNotesNotesWorkflowYour next prompt can hand work to Never Notes helpers.● Fix login · Tool agents42% AllCopy failed2h 10m● Fix login · Tool agents42% AllCopy failed2h 10m● Fix login · Tool agents42% AllCopy failed2h 10m
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claude…
-
spending-effort-with-jev: no TypeSafe API key, so effort tips are off. Set it in /plugin.⚠ effort: long run, fuzzy spec → have Claude interview you, then go maxAsk Claude…
-
✦ explain as pick how Claude answers×3 ● build3 ● build3 ● build▸ VideoAsk Claude…
-
Ask Claude…Agents●●●✻ AgentsEditNo agents yet. They show here while they run.Agent──Fix login────────● build ········━━━━━━━━········2h 10m● build ········━━━━━━━━········2h 10m● build ········━━━━━━━━········2h 10m✗ Grepclick an agent to open it · click "done" to hide finished ones
-
Ask Claude…superpowersϟ Arc tokens showing buildNot now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)d darkl lightz daltonizeda ansiu auto