clawd-on-desk
A pixel desktop pet that watches Claude Code, Codex, Cursor & other AI coding agents, so you don't have to.
What effortless runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
Claude Code
> /plugin marketplace add HeyCubit/effortless> /plugin install effortless@effortless
Cursor
Cursor also runs Claude Code hooks from .claude/settings.json, so copy these hooks there to use them in Cursor.
Where it lives
import { getTheme, tintHex } from './theme'
// Art for the terminal's bands: a small Raster of `▀` cells, each two pixels tall (foreground on top, background
// below). Pure functions of the kind and a frame count, so the art can be tested and blitted from a timer.
export type ArtKind = 'cold' | 'swamp' | 'hot' | 'down' | 'brand' | 'calm' | 'compacting' | 'done'
/** The size every band's art is drawn at: 16 columns by 2 rows, 16 by 4 pixels. */
export const ART_COLUMNS = 16
export const ART_ROWS = 2
/** Below this many columns the band leaves its art out, so the words keep their room. */
export const ART_MIN_WIDTH = 90
/** One frame every this many milliseconds while a moving band shows. */
export const ART_FRAME_MS = 100
/** The kinds that move; the rest are drawn once. */
export const MOVING: ReadonlySet<ArtKind> = new Set(['cold', 'swamp', 'hot', 'down', 'compacting'])
type Rgb = readonly [number, number, number]
const hex = (h: string): Rgb => [parseInt(h.slice(1, 3), 16), parseInt(h.slice(3, 5), 16), parseInt(h.slice(5, 7), 16)]
const mix = (a: Rgb, b: Rgb, k: number): Rgb => [a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k, a[2] + (b[2] - a[2]) * k]
const pack = (c: Rgb) => ((Math.round(c[0]) << 16) | (Math.round(c[1]) << 8) | Math.round(c[2])) >>> 0
// A fixed pseudo-random number per seed, so particles keep their lanes from frame to frame.
const rand = (seed: number) => {
const s = Math.sin(seed * 12.9898) * 43758.5453
return s - Math.floor(s)
}
// Each kind's ground (the band's background) and its light colour.
const PALETTE: Record<ArtKind, { ground: Rgb; deep: Rgb; light: Rgb; glow: Rgb }> = {
cold: { ground: hex('#0e1820'), deep: hex('#2f5c80'), light: hex('#dff1ff'), glow: hex('#7cc4ff') },
swamp: { ground: hex('#111710'), deep: hex('#22351c'), light: hex('#cfe8b8'), glow: hex('#a7c98f') },
hot: { ground: hex('#1a110c'), deep: hex('#b8461b'), light: hex('#ffb06a'), glow: hex('#f08a3c') },
down: { ground: hex('#12141b'), deep: hex('#39415a'), light: hex('#b4b8c4'), glow: hex('#6b7288') },
brand: { ground: hex('#15121f'), deep: hex('#4a3f80'), light: hex('#e4dfff'), glow: hex('#a79cf7') },
// The dashboard's: the brand's sparkles in grey, since it shows all the time.
calm: { ground: hex('#141416'), deep: hex('#2a2a2f'), light: hex('#d4d4d8'), glow: hex('#6e6e76') },
compacting: { ground: hex('#15121f'), deep: hex('#4a3f80'), light: hex('#e4dfff'), glow: hex('#a79cf7') },
done: { ground: hex('#0f1c15'), deep: hex('#2f7a4c'), light: hex('#d8f5e3'), glow: hex('#5ec48a') },
}
// The violet kinds in the current theme; the rest are not touched by it. Cached per theme so a pixel does not recolour.
const themed = new Map<string, (typeof PALETTE)[ArtKind]>()
function paletteOf(kind: ArtKind) {
const base = PALETTE[kind]
if (getTheme() === 'violet' || (kind !== 'brand' && kind !== 'compacting')) return base
const key = `${getTheme()}-${kind}`
let p = themed.get(key)
if (!p) {
const turn = (c: Rgb): Rgb => hex(tintHex(`#${c.map(v => Math.round(v).toString(16).padStart(2, '0')).join('')}`))
p = { ground: turn(base.ground), deep: turn(base.deep), light: turn(base.light), glow: turn(base.glow) }
themed.set(key, p)
}
return p
}
// The done tick, as pixels on the 16 by 4 grid (x, y).
const TICK: ReadonlyArray<readonly [number, number]> = [[9, 2], [10, 3], [11, 2], [12, 1], [13, 0]]
/** The colour of one pixel of `kind` at frame `t`: x from 0 to columns - 1, y from 0 (top) to rows * 2 - 1. */
export function artPixel(kind: ArtKind, t: number, x: number, y: number, cols = ART_COLUMNS, rows = ART_ROWS): number {
const p = PALETTE[kind]
const h = rows * 2
// The scene, then faded in from the left over six columns like the desktop art's mask.
let c: Rgb = mix(p.ground, p.deep, (y / (h - 1)) * 0.45)
if (kind === 'cold') {
// Frost along the bottom; flakes falling, each in its own lane, drifting a little.
if (y === h - 1) c = mix(c, p.glow, 0.35 + 0.15 * rand(x))
for (let i = 0; i < 5; i++) {
const lane = 4 + Math.floor(rand(i + 1) * (cols - 4))
const fy = (t / (5 + i) + rand(i + 9) * h) % (h + 1)
const fx = lane + Math.round(Math.sin(t / 7 + i))
if (x === fx && y === Math.floor(fy)) c = p.light
}
} else if (kind === 'swamp') {
// Bubbles rising, each lane on its own pace; they pale as they near the top.
for (let i = 0; i < 4; i++) {
const lane = 5 + Math.floor(rand(i + 3) * (cols - 5))
const by = h - 1 - ((t / (6 + i * 2) + rand(i + 5) * h) % (h + 1))
if (x === lane && y === Math.round(by)) c = mix(p.glow, p.light, 1 - by / h)
}
} else if (kind === 'hot') {
// A glowing bottom row that flickers; embers rising and dimming.
if (y === h - 1) c = mix(p.deep, p.glow, 0.5 + 0.5 * Math.abs(Math.sin(t / 3 + x)))
for (let i = 0; i < 5; i++) {
const lane = 4 + Math.floor(rand(i + 7) * (cols - 4))
const ey = h - 1 - ((t / (3 + i) + rand(i + 2) * h) % h)
if (x === lane && y === Math.round(ey) && y < h - 1) c = mix(p.light, p.glow, 1 - ey / h)
}
} else if (kind === 'down') {
// Still flecks under a slow pulse: the judge is not answering.
const pulse = 0.5 + 0.5 * Math.sin(t / 8)
if (rand(x * 7 + y * 13) > 0.82) c = mix(c, p.light, 0.25 + 0.35 * pulse)
} else if (kind === 'brand' || kind === 'calm' || kind === 'compacting') {
// Sparkles in fixed places: still for brand, twinkling while compacting.
if (rand(x * 5 + y * 11 + 3) > 0.84) {
const twinkle = kind === 'compacting' ? 0.5 + 0.5 * Math.sin(t / 2 + x * 1.7 + y) : 0.8
c = mix(p.glow, p.light, twinkle)
}
} else if (kind === 'done') {
if (TICK.some(([tx, ty]) => tx === x && ty === y)) c = p.light
}
return pack(mix(p.ground, c, Math.min(1, x / 6)))
}
/** One frame of `kind`'s art as Raster cells: base64 of `[codePoint, top, bottom]` per cell, row-major. */
export function artFrame(kind: ArtKind, t: number, cols = ART_COLUMNS, rows = A// The effortless mark (the four-point star), from brand/mark.svg. Generated: node -e in the commit that added it; // regenerate when the mark changes. export const MARK_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><defs><mask id=\"kem\"><path fill=\"#fff\" d=\"M49.84 12.97 L49.84 13.13 L49.84 13.29 L49.78 13.45 L49.78 13.60 L49.78 13.76 L49.73 13.91 L49.73 14.07 L49.67 14.23 L49.67 14.39 L49.67 14.55 L49.62 14.71 L49.62 14.86 L49.57 15.02 L49.57 15.17 L49.51 15.33 L49.51 15.49 L49.46 15.65 L49.46 15.81 L49.40 15.96 L49.35 16.12 L49.35 16.28 L49.29 16.43 L49.29 16.59 L49.24 16.75 L49.24 16.90 L49.18 17.06 L49.13 17.22 L49.13 17.38 L49.07 17.54 L49.02 17.69 L49.02 17.85 L48.96 18.01 L48.91 18.17 L48.91 18.32 L48.85 18.48 L48.80 18.64 L48.74 18.80 L48.74 18.95 L48.69 19.11 L48.64 19.26 L48.64 19.42 L48.58 19.58 L48.53 19.74 L48.47 19.90 L48.42 20.05 L48.42 20.21 L48.36 20.37 L48.31 20.52 L48.25 20.68 L48.20 20.84 L48.14 20.99 L48.14 21.15 L48.09 21.31 L48.03 21.47 L47.98 21.63 L47.92 21.78 L47.87 21.94 L47.82 22.10 L47.76 22.26 L47.71 22.41 L47.65 22.57 L47.60 22.73 L47.54 22.89 L47.49 23.04 L47.43 23.20 L47.38 23.35 L47.32 23.51 L47.27 23.67 L47.21 23.83 L47.16 23.99 L47.10 24.15 L47.05 24.30 L46.99 24.46 L46.94 24.61 L46.89 24.77 L46.78 24.93 L46.72 25.09 L46.67 25.24 L46.61 25.40 L46.56 25.56 L46.45 25.72 L46.39 25.87 L46.34 26.03 L46.28 26.19 L46.23 26.35 L46.12 26.50 L46.07 26.66 L46.01 26.82 L45.96 26.98 L45.85 27.13 L45.79 27.29 L45.69 27.44 L45.63 27.60 L45.58 27.76 L45.47 27.92 L45.41 28.08 L45.30 28.24 L45.25 28.39 L45.14 28.56 L45.09 28.72 L44.98 28.88 L44.92 29.05 L44.81 29.22 L44.76 29.39 L44.65 29.56 L44.59 29.73 L44.48 29.89 L44.38 30.07 L44.32 30.25 L44.21 30.43 L44.10 30.61 L44.05 30.79 L43.94 30.97 L43.83 31.16 L43.72 31.35 L43.61 31.54 L43.50 31.73 L43.39 31.93 L43.34 32.11 L43.23 32.31 L43.12 32.51 L42.95 32.72 L42.84 32.92 L42.73 33.12 L42.63 33.33 L42.52 33.54 L42.41 33.75 L42.30 33.96 L42.13 34.18 L42.02 34.39 L41.86 34.61 L41.75 34.82 L41.64 35.03 L41.48 35.25 L41.32 35.47 L41.21 35.69 L41.04 35.91 L40.88 36.13 L40.77 36.34 L40.61 36.56 L40.44 36.78 L40.28 37.00 L40.11 37.22 L39.95 37.44 L39.73 37.65 L39.57 37.87 L39.40 38.09 L39.19 38.31 L39.02 38.53 L38.80 38.75 L38.64 38.96 L38.42 39.18 L38.20 39.40 L37.98 39.62 L37.76 39.84 L37.55 40.06 L37.33 40.28 L37.11 40.50 L36.84 40.72 L36.62 40.93 L36.35 41.15 L36.13 41.37 L35.85 41.59 L35.58 41.81 L35.31 42.02 L35.03 42.24 L34.76 42.46 L34.43 42.68 L34.16 42.90 L33.83 43.12 L33.50 43.33 L33.18 43.55 L32.85 43.77 L32.47 43.99 L32.09 44.21 L31.76 44.43 L31.32 44.65 L30.94 44.87 L30.50 45.09 L30.06 45.30 L29.63 45.52 L29.19 45.74 L28.70 45.96 L28.15 46.18 L27.66 46.40 L27.12 46.61 L26.51 46.83 L25.91 47.05 L25.26 47.27 L24.60 47.49 L23.89 47.71 L23.13 47.92 L22.36 48.14 L21.49 48.36 L20.61 48.58 L19.63 48.80 L18.59 49.02 L17.39 49.23 L16.14 49.45 L14.66 49.67 L12.91 49.89 L7.78 50.00 L11.88 50.00 L13.84 50.22 L15.43 50.44 L16.84 50.66 L18.05 50.88 L19.14 51.09 L20.18 51.31 L21.11 51.53 L21.93 51.75 L22.75 51.97 L23.51 52.19 L24.28 52.40 L24.93 52.62 L25.58 52.84 L26.24 53.06 L26.79 53.28 L27.39 53.50 L27.94 53.71 L28.43 53.93 L28.92 54.15 L29.41 54.37 L29.84 54.59 L30.34 54.80 L30.72 55.02 L31.16 55.24 L31.54 55.46 L31.92 55.68 L32.31 55.90 L32.63 56.12 L33.01 56.34 L33.34 56.56 L33.67 56.77 L34.00 56.99 L34.27 57.21 L34.60 57.43 L34.87 57.65 L35.20 57.87 L35.47 58.08 L35.75 58.30 L35.96 58.52 L36.24 58.74 L36.51 58.96 L36.73 59.18 L37.00 59.39 L37.22 59.61 L37.44 59.83 L37.65 60.05 L37.87 60.27 L38.09 60.49 L38.31 60.71 L38.53 60.93 L38.75 61.15 L38.91 61.36 L39.13 61.58 L39.29 61.80 L39.46 62.02 L39.68 62.24 L39.84 62.46 L40.01 62.67 L40.17 62.89 L40.33 63.11 L40.50 63.33 L40.66 63.55 L40.83 63.76 L40.99 63.98 L41.10 64.20 L41.26 64.42 L41.43 64.64 L41.53 64.86 L41.70 65.07 L41.81 65.28 L41.97 65.50 L42.08 65.72 L42.19 65.93 L42.35 66.15 L42.46 66.36 L42.57 66.57 L42.68 66.78 L42.79 66.97 L42.90 67.18 L43.06 67.38 L43.17 67.59 L43.28 67.79 L43.39 67.99 L43.45 68.17 L43.55 68.37 L43.66 68.56 L43.77 68.75 L43.88 68.94 L43.99 69.12 L44.05 69.30 L44.16 69.48 L44.27 69.66 L44.38 69.84 L44.43 70.02 L44.54 70.19 L44.59 70.36 L44.70 70.53 L44.81 70.70 L44.87 70.87 L44.98 71.03 L45.03 71.20 L45.14 71.36 L45.20 71.53 L45.30 71.68 L45.36 71.84 L45.47 72.00 L45.52 72.16 L45.58 72.32 L45.69 72.48 L45.74 72.63 L45.79 72.79 L45.90 72.95 L45.96 73.10 L46.01 73.26 L46.12 73.42 L46.17 73.57 L46.23 73.73 L46.28 73.89 L46.39 74.05 L46.45 74.21 L46.50 74.36 L46.56 74.52 L46.61 74.68 L46.72 74.84 L46.78 74.99 L46.83 75.15 L46.89 75.31 L46.94 75.47 L46.99 75.62 L47.05 75.78 L47.10 75.93 L47.21 76.09 L47.27 76.25 L47.32 76.41 L47.38 76.57 L47.43 76.73 L47.49 76.88 L47.54 77.03 L47.60 77.19 L47.65 77.35 L47.71 77.51 L47.76 77.67 L47.82 77.82 L47.87 77.98 L47.92 78.14 L47.92 78.30 L47.98 78.45 L48.03 78.61 L48.09 78.77 L48.14 78.93 L48.20 79.08 L48.25 79.24 L48.25 79.40 L48.31 79.56 L48.36 79.71 L48.42 79.87 L48.47 80.02 L48.53 80.18 L48.53 80.34 L48.58 80.50 L48.64 80.66 L48.69 80.82 L48.69 80.97 L48.74 81.12 L48.80 81.28 L48.85 81.44 L48.85 81.60 L48.91 81.76 L48.96 81.91 L48.96 82.07 L49.02 82.23 L49.07 82.38 L49.07 82.54 L49.13 82.70 L49.18 82.86 L49.18 83.02 L49.24 83.18 L49.24 83.33 L49.29 83.49 L49.35 83.64 L49.35 83.80 L49.40 83.96 L49.40 84.12 L49.46 84.27 L49.46 84.43 L49.51 84.59 L49.51 84.75 L49.57 84.90 L49.57 85.06 L49.62 85.21 L49.62 85.37 L49.67 85.53 L49.67 85.69 L49.73 85.85 L49.73 86.01 L49.73 86.16 L49.78 86.32 L49.78 86.47 L49.84 86.63 L49.84 86.79 L49.84 86.95 L50.16 87.03 L50.16 86.87 L50.16 86.71 L50.22 86.55 L50.22 86.40 L50.22 86.24 L50.27 86.09 L50.27 85.93 L50.33 85.77 L50.33 85.61 L50.33 85.45 L50.38 85.29 L50.38 85.14 L50.43 84.98 L50.43 84.83 L50.49 84.67 L50.49 84.51 L50.54 84.35 L50.54 84.19 L50.60 84.04 L50.65 83.88 L50.65 83.72 L50.71 83.57 L50.71 83.41 L50.76 83.25 L50.76 83.10 L50.82 82.94 L50.87 82.78 L50.87 82.62 L50.93 82.46 L50.98 82.31 L50.98 82.15 L51.04 81.99 L51.09 81.83 L51.
// The look of the mod's accent: violet (the brand) or Claude orange. Every violet in the mod is one hex of the same
// family, so the theme turns them in one place instead of keeping two sets of colours: any #rrggbb in a violet hue is
// moved to the orange hue, neutrals and the other signal colours (green, yellow, red, blue) are left alone.
export type ThemeName = 'violet' | 'orange' | 'rose'
export const THEMES: readonly ThemeName[] = ['violet', 'orange', 'rose']
// The hue each theme turns the violets to. Rose is a cherry-blossom pink; its sparkles are drawn as falling petals (see petals).
const HUES: Record<Exclude<ThemeName, 'violet'>, number> = { orange: 15, rose: 340 }
let current: ThemeName = 'violet'
// Light appearance: the panels are drawn for a dark app; on a light one every colour is turned (lightHex) so the surfaces
// come out pale and the text and accents deep. It sits on top of the theme's hue, so every theme has a light form.
let light = false
export const setLight = (on: boolean) => {
if (on !== light) lmemo.clear()
light = on
}
export const isLight = () => light
export const setTheme = (name: ThemeName) => {
// The turned colours are remembered per hex, so a new theme starts with none: orange's would show in rose.
if (name !== current) memo.clear()
current = name
}
export const getTheme = () => current
/** The brand violet, the colour the rest of the family is turned from. */
export const VIOLET = '#a79cf7'
// Claude's orange (#d97757) sits at hue 15, saturation 63%, lightness 60%. The brand violet is lighter and stronger, so
// the saturation and the lightness of what turns come down to meet it.
const hexRe = /#[0-9a-fA-F]{6}\b/g
const memo = new Map<string, string>()
const lmemo = new Map<string, string>()
function toHsl(r: number, g: number, b: number): [number, number, number, number] {
const max = Math.max(r, g, b), min = Math.min(r, g, b), d = max - min
const l = (max + min) / 2
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1))
let h = 0
if (d !== 0) {
h = max === r ? ((g - b) / d) % 6 : max === g ? (b - r) / d + 2 : (r - g) / d + 4
h = (h * 60 + 360) % 360
}
return [h, s, l, d]
}
function fromHsl(h: number, s: number, l: number): string {
const c = (1 - Math.abs(2 * l - 1)) * s
const x = c * (1 - Math.abs(((h / 60) % 2) - 1))
const m = l - c / 2
const [r, g, b] = h < 60 ? [c, x, 0] : h < 120 ? [x, c, 0] : h < 180 ? [0, c, x] : h < 240 ? [0, x, c] : h < 300 ? [x, 0, c] : [c, 0, x]
const byte = (v: number) => Math.max(0, Math.min(255, Math.round((v + m) * 255))).toString(16).padStart(2, '0')
return `#${byte(r)}${byte(g)}${byte(b)}`
}
/** One hex in the current theme: violets turn orange, everything else stays. */
export function tintHex(hex: string): string {
if (current === 'violet') return hex
const key = hex.toLowerCase()
const hit = memo.get(key)
if (hit) return hit
const n = parseInt(key.slice(1), 16)
const [h, s, l, chroma] = toHsl((n >> 16) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255)
// Violet hues with real colour in them; the greys that lean blue (hardly any chroma or saturation) are not in the family.
const out = h >= 235 && h <= 300 && chroma >= 0.03 && s >= 0.15 ? fromHsl(HUES[current], Math.min(1, s * (current === 'rose' ? 0.9 : 0.75)), l > 0.5 ? Math.max(0.5, l - (current === 'rose' ? 0.08 : 0.19)) : l) : hex
memo.set(key, out)
return out
}
// A cherry-blossom petal, and the fall it makes: each sparkle of the art becomes a petal at the same place, falling slowly
// and turning as it goes. The drawing's own CSS animates sparkles in place; the petals bring their own.
const PETAL = 'M0 -2.2C1.7 -1.7 1.9 0.9 0 2.2C-1.9 0.9 -1.7 -1.7 0 -2.2Z'
const PETAL_CSS = '.pt{fill:#ffb3cf;opacity:0;animation-name:fall;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes fall{0%{opacity:0;transform:translate(0,-4px) rotate(0deg)}12%{opacity:.6}85%{opacity:.5}100%{opacity:0;transform:translate(-16px,34px) rotate(280deg)}}'
function petals(text: string): string {
if (!text.includes('class="sp"')) return text
return text
.replace(/<path class="sp" style="transform-origin:([\d.]+)px [\d.]+px;animation-duration:([\d.]+)s;animation-delay:([\d.]+)s" d="[^"]*"\/>/g, (_m, x: string, dur: string, delay: string) =>
`<g transform="translate(${x} 0)"><path class="pt" style="animation-duration:${(Number(dur) * 2.2).toFixed(1)}s;animation-delay:${delay}s" d="${PETAL}"/></g>`)
.replace('</style>', `${PETAL_CSS}</style>`)
}
/**
* One hex turned for a light app. A surface that was dark comes out pale. Text that was light comes out deep, as light as
* it can be while still reading on the pale surfaces (4.6:1), so violet stays violet and green stays green; text that was
* already dark is only darkened if it would not read. Drawn art has no role, so it follows its own lightness. An
* eight-digit hex keeps its alpha.
*/
const luminance = (hex: string) => {
const n = parseInt(hex.slice(1, 7), 16)
const f = (v: number) => (v /= 255) <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4)
return 0.2126 * f(n >> 16) + 0.7152 * f((n >> 8) & 255) + 0.0722 * f(n & 255)
}
// The palest and the deepest of the turned surfaces: text has to read on both.
const PALE_REF = luminance('#e3e0ed')
export function lightHex(hex: string, role: 'text' | 'surface' | 'art' = 'art'): string {
const key = hex.toLowerCase()
const memoKey = role + key
const hit = lmemo.get(memoKey)
if (hit) return hit
const n = parseInt(key.slice(1, 7), 16)
const [h, s, l] = toHsl((n >> 16) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255)
const asText = role === 'text' || (role === 'art' && l >= 0.5)
let out: string
if (asText) {
const sat = Math.min(s, 0.72)
// Greys keep their order (main text darker than dim); strong colours start a little lighter so they stay colours.
let at = l >= 0.5 ? Math.max(0.12, Math.min(0.5, 1 - l + (s >= 0.35 ? 0.2 : 0))) : l
out =Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
Mods for Claude Code. effortless picks the reasoning effort for every prompt and shows the cache countdown. textless (desktop app) shows art, quotes and chess instead of the wall of text while Claude works.
A pixel desktop pet that watches Claude Code, Codex, Cursor & other AI coding agents, so you don't have to.
Local evidence and replay for coding agents. Used by Meta, ByteDance, Zama.ai & more       Install with your coding agent.