From e4306e5435eef76bad7fa9b3b909362304a8a47e Mon Sep 17 00:00:00 2001 From: skylar Date: Sat, 28 Nov 2026 05:59:53 -0800 Subject: luxnox: one palette for light and dark themes palette.toml drives kitty, the dwl desktop (dwl, fuzzel, swaync, wob, wmenu), GTK, Qt, the console and Emacs; luxnox-toggle switches lux and nox. Co-Authored-By: Claude Opus 5.5 --- claude/hooks/register.ts | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 claude/hooks/register.ts (limited to 'claude/hooks/register.ts') diff --git a/claude/hooks/register.ts b/claude/hooks/register.ts new file mode 100644 index 0000000..6c7b7d9 --- /dev/null +++ b/claude/hooks/register.ts @@ -0,0 +1,58 @@ +import type { Register, ThemeSetArgs } from 'claude-code' + +import { makeColors } from './make-colors.js' + +// luxnox palette from ~/Projects/luxnox/palette.toml. Flat like the GTK +// themes: pure white / pure black page, nox's raised surfaces from its +// line/surface/hover grays. +const { theme, problems } = makeColors({ + label: 'luxnox', + id: 'luxnox', + contrast: 'more', + light: { + roles: { accent: '#0b43b1', danger: '#981617', success: '#10591b', warning: '#5c4b0d', pro: '#8a157a' }, + git: { added: '#10591b', removed: '#981617', modified: '#5c4b0d', merged: '#8a157a', closed: '#981617', conflicting: '#a23000', draft: '#565656' }, + gray: { + anchors: { + 'surface-0': '#ffffff', + 'surface-1': '#ffffff', + 'surface-2': '#ffffff', + 'surface-3': '#ffffff', + 'text-primary': '#111111', + 'text-secondary': '#333333', + 'text-muted': '#565656', + }, + }, + }, + dark: { + roles: { accent: '#6699fa', danger: '#fb6e63', success: '#1fb339', warning: '#c8911c', pro: '#ef63e0' }, + git: { added: '#1fb339', removed: '#fb6e63', modified: '#c8911c', merged: '#ef63e0', closed: '#fb6e63', conflicting: '#ff9e8e', draft: '#a3a3a3' }, + gray: { + anchors: { + 'surface-0': '#000000', + 'surface-1': '#0f0f0f', + 'surface-2': '#1a1a1a', + 'surface-3': '#1a1a1a', + 'text-primary': '#e6e6e6', + 'text-secondary': '#c4c4c4', + 'text-muted': '#a3a3a3', + }, + }, + }, +}) + +const LOOK: ThemeSetArgs = { colors: theme } + +export const register: Register = on => { + on('session.start', async ($, e, next) => { + const unpainted = problems.find(line => line.startsWith("Desktop won't paint")) + if (unpainted !== undefined) { + $.ui.toast(unpainted) + } + const set = await $.theme.set(LOOK) + if (!set.isDrawn) { + $.ui.status(set.reason) + } + return next(e) + }) +} -- cgit v1.2.3