Skip to content

A script to create the new colors.toml for exsisting Omarchy themes

Notifications You must be signed in to change notification settings

OldJobobo/make-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

make-colors

Generate a colors.toml file for a theme directory by extracting colors from terminal theme configs.

What It Does

  • Reads a theme directory containing alacritty.toml, kitty.conf, warp.yaml, or ghostty.conf.
  • Extracts required colors and writes colors.toml into the same directory.
  • Prefers alacritty.toml when present; otherwise falls back to ghostty.conf, then warp.yaml or kitty.conf.

Installation

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-colors

Then run:

make-colors /path/to/theme-dir

Usage

./make-colors.sh /path/to/theme-dir

If the provided path is relative and does not exist, the script also checks:

./omarchy-<name>-theme

in the current directory.

If the provided path includes a directory, the script also checks:

<dir>/omarchy-<name>-theme

where <dir> is the parent directory of the argument.

Example:

./make-colors.sh themes/omarchy-foo-theme

Path fallback example:

./make-colors.sh themes/foo

If 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.

Expected Theme Layout

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.

Output

Creates if not present:

themes/omarchy-foo-theme/colors.toml

Requirements

  • POSIX sh
  • awk

Notes

  • The script exits with a list of missing color keys if any required values are not found.
  • colors.toml is written via a temp file and then moved into place.
  • The script logs [INFO], [SKIP], [SUCCESS], and [FAILURE] messages for each argument.

About

A script to create the new colors.toml for exsisting Omarchy themes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages