CommandCodeAI / CommandCodeAI/command-code

Custom theme slot: follow system/desktop theme with live reload

Đang mở
#812 3 bình luận 0 reaction 2 người được giao Xem trên GitHub

@aliarain đang làm issue này rồi.

Từ ngày 8/9/2026.

desktop
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4k
Fork
350
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Feature Description

Command Code to support one extra theme slot called custom. It would read ~/.commandcode/themes/custom/palette.json, layer it over the dark base, and repaint when the file changes. It should work everywhere a theme name works: config, --config theme=, /theme, and the
picker. The watcher should use fs.watch with an mtime poll fallback. And the palette JSON schema should be documented so desktop themes can target it.

Use Case

I run Omarchy. The system already picks one palette and repaints quickshell and the bar on omarchy theme set. Command Code sits outside that. Auto only looks at terminal background, so the TUI never matches the desktop and I have to restart it after a theme switch. A file-backed custom slot would let Omarchy publish its palette once and let Command Code follow it.

Additional Context

I proved this out locally with a patch. A small Python script turns colors.toml into a 77-key palette.json. I tested it on Matte Black and others in dark mode. I map flat keys onto USER_MSG_COLORS, DIFF_COLORS, STATUS_COLORS, TASTE_COLORS, PR_COLORS, MARKDOWN_COLORS, and LOGO_BANNER_COLORS, and the quickshell accent drives the TUI accent. A theme-set hook rewrites palette.json on every system switch. The watcher swaps in a fresh snapshot and calls applyTuiTheme("custom"). It repaints a running session in about two seconds. Partial palettes fall back to base tokens. I can share the scripts. They are bundle patches, not mergeable code, but they pin down the mapping and reload wiring. Open questions are whether this stays separate from auto, who owns per-desktop converters, and how to version the schema.

How important is this to you?

Nice to have

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.