Generate a colors.toml file for a theme directory by extracting colors from terminal theme configs.
- Reads a theme directory containing
alacritty.toml,kitty.conf,warp.yaml, orghostty.conf. - Extracts required colors and writes
colors.tomlinto the same directory. - Prefers
alacritty.tomlwhen present; otherwise falls back toghostty.conf, thenwarp.yamlorkitty.conf.
Make the script executable and optionally symlink it into ~/.local/bin:
chmod +x make-colors.sh
ln -s "$(pwd)/make-colors.sh" ~/.local/bin/make-colorsThen run:
make-colors /path/to/theme-dir./make-colors.sh /path/to/theme-dirIf the provided path is relative and does not exist, the script also checks:
./omarchy-<name>-themein the current directory.
If the provided path includes a directory, the script also checks:
<dir>/omarchy-<name>-themewhere <dir> is the parent directory of the argument.
Example:
./make-colors.sh themes/omarchy-foo-themePath fallback example:
./make-colors.sh themes/fooIf themes/foo is missing, the script checks themes/omarchy-foo-theme.
Batch example:
./make-colors.sh themes/*Non-directories and directories without theme files are skipped, and existing colors.toml files are left untouched.
themes/omarchy-foo-theme/
alacritty.toml
kitty.conf
warp.yaml
ghostty.conf
Only one or more of the config files needs to exist, but the combined data must provide all required colors.
Creates if not present:
themes/omarchy-foo-theme/colors.toml
- POSIX
sh awk
- The script exits with a list of missing color keys if any required values are not found.
colors.tomlis written via a temp file and then moved into place.- The script logs
[INFO],[SKIP],[SUCCESS], and[FAILURE]messages for each argument.