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

black-atom-industries/wezterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black Atom for WezTerm

Black Atom Banner

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

What is a Black Atom Adapter?

This repository is a WezTerm 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, terminals, 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/wezterm.git
cd wezterm
  1. Adapt the theme files using Black Atom Core:
# From the core repository
black-atom-core adapt
  1. Copy the adapted .toml files to your WezTerm configuration directory:
mkdir -p ~/.config/wezterm/colors
cp themes/*/*.toml ~/.config/wezterm/colors/

Usage

Method 1: Specifying a Theme in your Configuration

After installing the themes to your WezTerm configuration directory, you can use the color_scheme option:

-- In your ~/.config/wezterm/wezterm.lua file
local wezterm = require('wezterm')
local config = {}

if wezterm.config_builder then
    config = wezterm.config_builder()
end

-- To use a specific theme:
config.color_scheme = "Black Atom — JPN ∷ Koyo Yoru"

return config

Method 2: Loading Themes from Files

Alternatively, you can load the themes directly from files:

-- In your ~/.config/wezterm/wezterm.lua file
local wezterm = require('wezterm')
local config = {}

if wezterm.config_builder then
    config = wezterm.config_builder()
end

-- Load color scheme from file
config.color_schemes = {
  ["Black Atom — JPN ∷ Koyo Yoru"] = wezterm.color_scheme.load(
    "~/.config/wezterm/colors/black-atom-jpn-koyo-yoru.toml"
  ),
}

-- Use the loaded scheme
config.color_scheme = "Black Atom — JPN ∷ Koyo Yoru"

return config

Theme Installation

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

  1. ~/.config/wezterm/colors (Linux/macOS)
  2. %USERPROFILE%\.config\wezterm\colors (Windows)
# Create the colors directory if it doesn't exist
mkdir -p ~/.config/wezterm/colors

# Copy the generated theme files
cp themes/*/*.toml ~/.config/wezterm/colors/

Development

Theme Format

WezTerm themes are TOML files that define terminal colors. Black Atom themes define the following properties:

# Metadata
[metadata]
author = "Black Atom Industries"
name = "Black Atom — JPN ∷ Koyo Yoru"

# Basic terminal colors
[colors]
foreground = "#e6cbb2"
background = "#332733"
cursor_bg = "#8cc1b0"
cursor_border = "#8cc1b0"
cursor_fg = "#332733"
selection_bg = "#908caa"
selection_fg = "#332733"

# 16-color palette
ansi = [
  "#3f2f3f", # black
  "#b46371", # dark_red
  "#53ad82", # dark_green
  "#ee9c6b", # dark_yellow
  "#ad8593", # dark_blue
  "#ef9d6c", # dark_magenta
  "#68b19a", # dark_cyan
  "#aaa7be", # light_gray
]

brights = [
  "#6e6a86", # gray
  "#eb6f84", # red
  "#7ab89b", # green
  "#e9b162", # yellow
  "#a095a8", # blue
  "#ffb488", # magenta
  "#8cc1b0", # cyan
  "#e6cbb2", # white
]

# Tab bar colors
[colors.tab_bar]
# ... tab bar settings

For more information on WezTerm 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:

[metadata]
author = "Black Atom Industries"
name = "<%= theme.meta.label %>"

[colors]
foreground = "<%= theme.ui.fg.default %>"
background = "<%= theme.ui.bg.default %>"
cursor_bg = "<%= theme.ui.fg.accent %>"
# ...and so on

Creating New Templates

To create a new template:

  1. Create a .template.toml 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 .toml 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 WezTerm colors directory if it doesn't exist
mkdir -p ~/.config/wezterm/colors

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

Alternatively, you can create symlinks for specific collections:

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

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

# 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. Restart WezTerm or reload your configuration 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

0