Skip to content

About

Live-preview picker for cmux appearance — arrow through themes, fonts, opacity and blur while the terminal repaints under you. One zsh script, no dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmux-theme-editor

A live-preview appearance picker for cmux. Arrow through 460+ themes, your installed monospaced fonts, opacity and blur — the whole terminal repaints as you move, Enter keeps it, Escape puts back exactly what was there before.

No dependencies. One zsh script, no fzf, no Homebrew tap, no config file of its own.

  cmux appearance    ↑↓ move · ⏎ open · esc quit
  ~/.config/ghostty/config

  Dark theme        Gruvbox Dark Hard
  Light theme       Catppuccin Latte
  Font              Geist Mono · 14pt
  Opacity           1.00
  Background blur   20

Why

cmux splits its appearance across two files, which is not obvious:

What Where Owner
Colour theme ~/Library/Application Support/com.cmuxterm.app/config.ghostty cmux — one managed theme = light:…,dark:… line
Font, size, opacity, blur, padding, cursor ~/.config/ghostty/config you

A theme = line in your Ghostty config is silently overridden by cmux's own block, so editing the file you'd expect to edit does nothing. And picking a theme by name out of a 463-entry list means editing, reloading, squinting, repeating.

This does the loop for you. cmux is Ghostty underneath and cmux reload-config re-reads both files in place, so previews are instant and no restart is needed.

Install

git clone https://github.com/BTNG-studio/cmux-theme-editor.git
cd cmux-theme-editor && ./install.sh

That symlinks bin/cmux-theme-editor into ~/.local/bin, so git pull updates the installed command. Or just copy bin/cmux-theme-editor anywhere on your PATH — it only needs lib/ alongside it for font scanning.

Requirements: macOS, cmux, zsh (the system default). Font listing additionally needs Swift — xcode-select --install if you don't have it.

Use

cmux-theme-editor            # menu: theme, font, opacity, blur
cmux-theme-editor --dark     # jump straight to the dark theme picker
cmux-theme-editor --light
cmux-theme-editor --both     # one theme for both light and dark
cmux-theme-editor font       # + / - resize while you browse
cmux-theme-editor font --refresh    # rescan after installing new fonts
cmux-theme-editor opacity
cmux-theme-editor blur
Key
↑ ↓ / ctrl-p ctrl-n move — applies live
type filter the list
⏎ keep, and go back to the menu
esc revert to what was there before
+ - font size (font picker only)
ctrl-c revert and quit

Theme entries preview their full 16-colour palette and a background/foreground sample. Opacity shows a bar and how much of your desktop bleeds through. The blur picker tells you when blur is doing nothing because opacity is 1.00.

Notes

  • Escape is a real revert, not a "set it back to roughly what it was". Theme changes go back through cmux themes set; anything in ghostty/config restores the file byte-for-byte, comments and unrelated keys intact. Edits are single-line — nothing else in your config moves.
  • It refuses to run without a TTY. Piping into it would otherwise apply the first list entry as a preview and then exit without reverting, stranding you on a theme you never picked.
  • Font detection uses CoreText's monospace trait, falling back to measuring glyph advances, because some fonts (Commit Mono, for one) never set the trait. Results cache in ~/.local/state/cmux-theme-editor/fonts.txt; macOS takes a few seconds to surface newly installed fonts, so --refresh right after a brew install --cask font-… may come up short — run it again.
  • background-blur-radius vs background-blur: Ghostty renamed this key. The script follows whichever one your config already uses.

Licence

MIT

About

Live-preview picker for cmux appearance — arrow through themes, fonts, opacity and blur while the terminal repaints under you. One zsh script, no dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages