8000 GitHub - black-atom-industries/ghostty: Black Atom Adapter for the Ghostty terminal
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

black-atom-industries/ghostty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black Atom for Ghostty

Black Atom Banner

A collection of elegant, cohesive themes for the Ghostty terminal by Black Atom Industries

What is a Black Atom Adapter?

This repository is a Ghostty adapter for the Black Atom theme ecosystem. In the Black Atom architecture:

  • The core repository is the single source of truth for all theme definitions
  • Each adapter implements these themes for a specific platform (Neovim, VS Code, Alacritty, etc.)
  • The adapter uses templates to transform core theme definitions into platform-specific files

This modular approach ensures consistent colors and styling across all supported platforms while allowing for platform-specific optimizations.

Available Themes

Black Atom includes multiple theme collections, each with its own distinct style:

Collection Themes Description
JPN koyo-hiru, koyo-yoru, tsuki-yoru Japanese-inspired themes
Stations engineering, operations, medical, research Space station-inspired themes
Terra seasons (spring, summer, fall, winter) × time (day, night) Earth season-inspired themes
CRBN null, supr Minimalist carbon themes

All themes are available in both dark and light variants.

Installation

Prerequisites

Setup

  1. Clone this repository:
git clone https://github.com/black-atom-industries/ghostty.git
cd ghostty
  1. Adapt the theme files using Black Atom Core:
# From the core repository
black-atom-core adapt
  1. Copy the adapted .conf files to your Ghostty themes directory:
COPY_PATH=~/.config/ghostty/themes
mkdir -p $COPY_PATH
cp themes/*/*.conf $COPY_PATH

Usage

Ghostty supports various ways to use themes. Below are the recommended methods for using Black Atom themes with Ghostty.

Method 1: Using the theme Configuration Option

After installing the themes to your Ghostty themes directory, you can use the built-in theme option:

# In your ~/.config/ghostty/config file
theme = black-atom-jpn-koyo-yoru

You can also specify different themes for light and dark mode:

# Use different themes based on system appearance
theme = dark:black-atom-terra-fall-night,light:black-atom-terra-fall-day

Don't forget to reload your configuration after changing the theme.

Method 2: Using the include Directive

Alternatively, you can directly include a theme file:

# In your ~/.config/ghostty/config file
include ~/.config/ghostty/themes/black-atom-jpn-koyo-yoru.conf

Theme Installation

For Ghostty to find themes by name, they must be placed in one of these directories:

  1. $XDG_CONFIG_HOME/ghostty/themes (typically ~/.config/ghostty/themes)
  2. $PREFIX/share/ghostty/themes
# Create the themes directory if it doesn't exist
mkdir -p ~/.config/ghostty/themes

# Copy the generated theme files
cp themes/*/*.conf ~/.config/ghostty/themes/

Listing Available Themes

To see all available themes including the Black Atom themes:

ghostty +list-themes

Development

Theme Format

Ghostty themes are simple configuration files that set color options. Black Atom themes define the following properties:

# Basic terminal colors
background = #value
foreground = #value
cursor-color = #value
cursor-text = #value
selection-background = #value
selection-foreground = #value

# 16-color palette
palette = 0=#value  # black
palette = 1=#value  # dark red
...
palette = 15=#value # white

For more information on Ghostty themes, see the official documentation.

Template Structure

Our templates use the Eta template engine syntax to inject theme values from the Black Atom core definitions:

background = <%= theme.ui.bg.default %>
foreground = <%= theme.ui.fg.default %>
cursor-color = <%= theme.ui.fg.accent %>
# ...and so on

Creating New Templates

To create a new template:

  1. Create a .template.conf file in the appropriate collection directory
  2. Use template variables to reference color values from the core definitions
  3. Add the template to black-atom-adapter.json
  4. Adapt the theme using the core CLI

Adapting Themes

To adapt all themes from the templates, run the black-atom-core adapt command from the directory of this repository.

# Adapt all themes
black-atom-core adapt

This will process all template files defined in black-atom-adapter.json and create the corresponding .conf files.

Development with Symlinks

For theme development, it's more efficient to use symlinks rather than copying files. This allows you to see changes immediately after adapting new theme files without having to copy them again:

# Create the Ghostty themes directory if it doesn't exist
mkdir -p ~/.config/ghostty/themes

# Create symlinks for all theme files
find ~/repos/black-atom-industries/ghostty/themes -name "*.conf" -type f -exec ln -sf {} ~/.config/ghostty/themes/ \;

Alternatively, you can create symlinks for specific collections:

# JPN Collection
ln -sf ~/repos/black-atom-industries/ghostty/themes/jpn/black-atom-jpn-koyo-hiru.conf ~/.config/ghostty/themes/
ln -sf ~/repos/black-atom-industries/ghostty/themes/jpn/black-atom-jpn-koyo-yoru.conf ~/.config/ghostty/themes/
ln -sf ~/repos/black-atom-industries/ghostty/themes/jpn/black-atom-jpn-tsuki-yoru.conf ~/.config/ghostty/themes/

# Stations Collection
ln -sf ~/repos/black-atom-industries/ghostty/themes/stations/black-atom-stations-engineering.conf ~/.config/ghostty/themes/
ln -sf ~/repos/black-atom-industries/ghostty/themes/stations/black-atom-stations-operations.conf ~/.config/ghostty/themes/
ln -sf ~/repos/black-atom-industries/ghostty/themes/stations/black-atom-stations-medical.conf ~/.config/ghostty/themes/
ln -sf ~/repos/black-atom-industries/ghostty/themes/stations/black-atom-stations-research.conf ~/.config/ghostty/themes/

# And so on for Terra and CRBN collections...

With symlinks in place, your workflow becomes:

  1. Make changes to templates
  2. Run black-atom-core adapt
  3. Reload Ghostty to see changes immediately

Contributing

Contributions are welcome! If you'd like to improve existing themes or add new features:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Create a pull request

License

MIT - See LICENSE for details

Related Projects

About

Black Atom Adapter for the Ghostty terminal

Topics

Resources

License

Stars

Watchers

Forks

0