simplify build process into light/dark variants

This commit is contained in:
Ray Elliott 2026-01-19 20:58:58 +00:00
parent c90556e0b9
commit 5396a98e26
8 changed files with 51 additions and 224 deletions

View File

@ -1,19 +1,24 @@
# Alacritty config builder
Simple shell script to generate multiple Alacritty config files from a shared base.
Simple shell script to generate Alacritty config file.
## Structure
- `src/base.toml` contains common settings
- Other files contain appearance or size variants
- `build.sh` concatenates base + variant into final configs
- `src/light.toml` contains light theme settings.
- `src/dark.toml` contains dark theme settings.
- `build.sh` concatenates base + variant into final config.
## Usage
```sh
./build.sh dark
./build.sh light
# defaults to light.
./build.sh
```
Generated files are written to `./`.
Generated file is written to `./alacritty.toml`.
Edit source files only. Generated files are disposable.
**Edit source files only**.

View File

@ -1,11 +1,18 @@
#!/bin/sh
set -e
SRC=./src
OUT=.
SRC_DIR=./src
OUT_FILE=./alacritty.toml
cat "$SRC/base.toml" "$SRC/default.toml" > "$OUT/alacritty.toml"
cat "$SRC/base.toml" "$SRC/small.toml" > "$OUT/alacritty--small.toml"
cat "$SRC/base.toml" "$SRC/light.toml" > "$OUT/alacritty--light.toml"
cat "$SRC/base.toml" "$SRC/light-small.toml" > "$OUT/alacritty--light-small.toml"
cat "$SRC/base.toml" "$SRC/light-large.toml" > "$OUT/alacritty--light-large.toml"
mode="${1:-light}"
case "$mode" in
light|dark) ;;
*)
echo "Usage: $0 [light|dark]" >&2
exit 1
;;
esac
theme="$SRC_DIR/$mode.toml"
cat "$SRC_DIR/base.toml" "$theme" > "$OUT_FILE"

View File

@ -9,6 +9,33 @@ TERM = "alacritty"
animation = "EaseOutExpo"
duration = 0
[font]
size = 11.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "Semibold Italic"
[font.normal]
family = "SourceCodePro"
style = "Semibold"
[font.offset]
x = -1
y = 0
[[keyboard.bindings]]
action = "Paste"
key = "V"

View File

@ -21,30 +21,3 @@ yellow = "#e1a574"
[colors.primary]
background = "#27292c"
foreground = "#a9abaa"
[font]
size = 9.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "Semibold Italic"
[font.normal]
family = "SourceCodePro"
style = "Semibold"
[font.offset]
x = -1
y = 0

View File

@ -1,50 +0,0 @@
[colors.bright]
black = "#484c52"
blue = "#96b1c9"
cyan = "#9fc9c3"
green = "#dffebe"
magenta = "#bfa5c7"
red = "#d27c7b"
white = "#fcf7e2"
yellow = "#f0d189"
[colors.normal]
black = "#35383b"
blue = "#7693ac"
cyan = "#749e99"
green = "#769972"
magenta = "#977ba0"
red = "#b05655"
white = "#848b92"
yellow = "#e1a574"
[colors.primary]
background = "#27292c"
foreground = "#a9abaa"
[font]
size = 11.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "Semibold Italic"
[font.normal]
family = "SourceCodePro"
style = "Semibold"
[font.offset]
x = -1
y = 0

View File

@ -1,54 +0,0 @@
[colors.bright]
black = "0xbcbcbc"
blue = "0xd75f00"
cyan = "0x005faf"
green = "0xd70087"
magenta = "0xd75f00"
red = "0xd70000"
white = "0x005f87"
yellow = "0x8700af"
[colors.cursor]
cursor = "0x878787"
text = "0xeeeeee"
[colors.normal]
black = "0xeeeeee"
blue = "0x0087af"
cyan = "0x005f87"
green = "0x008700"
magenta = "0x878787"
red = "0xaf0000"
white = "0x444444"
yellow = "0x5f8700"
[colors.primary]
background = "0xeeeeee"
foreground = "0x878787"
[font]
size = 13.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "SemiBold Italic"
[font.normal]
family = "SourceCodePro"
style = "SemiBold"
[font.offset]
x = -1
y = 0

View File

@ -1,54 +0,0 @@
[colors.bright]
black = "0xbcbcbc"
blue = "0xd75f00"
cyan = "0x005faf"
green = "0xd70087"
magenta = "0xd75f00"
red = "0xd70000"
white = "0x005f87"
yellow = "0x8700af"
[colors.cursor]
cursor = "0x878787"
text = "0xeeeeee"
[colors.normal]
black = "0xeeeeee"
blue = "0x0087af"
cyan = "0x005f87"
green = "0x008700"
magenta = "0x878787"
red = "0xaf0000"
white = "0x444444"
yellow = "0x5f8700"
[colors.primary]
background = "0xeeeeee"
foreground = "0x878787"
[font]
size = 9.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "SemiBold Italic"
[font.normal]
family = "SourceCodePro"
style = "SemiBold"
[font.offset]
x = -1
y = 0

View File

@ -25,30 +25,3 @@ yellow = "0x5f8700"
[colors.primary]
background = "0xeeeeee"
foreground = "0x878787"
[font]
size = 11.0
[font.bold]
family = "SourceCodePro"
style = "Bold"
[font.bold_italic]
family = "OperatorMono"
style = "Medium Italic"
[font.glyph_offset]
x = 0
y = 0
[font.italic]
family = "SourceCodePro"
style = "SemiBold Italic"
[font.normal]
family = "SourceCodePro"
style = "SemiBold"
[font.offset]
x = -1
y = 0