simplify build process into light/dark variants
This commit is contained in:
parent
c90556e0b9
commit
5396a98e26
15
README.md
15
README.md
|
|
@ -1,19 +1,24 @@
|
||||||
# Alacritty config builder
|
# 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
|
## Structure
|
||||||
|
|
||||||
- `src/base.toml` contains common settings
|
- `src/base.toml` contains common settings
|
||||||
- Other files contain appearance or size variants
|
- `src/light.toml` contains light theme settings.
|
||||||
- `build.sh` concatenates base + variant into final configs
|
- `src/dark.toml` contains dark theme settings.
|
||||||
|
- `build.sh` concatenates base + variant into final config.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
./build.sh dark
|
||||||
|
./build.sh light
|
||||||
|
|
||||||
|
# defaults to light.
|
||||||
./build.sh
|
./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**.
|
||||||
|
|
|
||||||
21
build.sh
21
build.sh
|
|
@ -1,11 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
SRC=./src
|
SRC_DIR=./src
|
||||||
OUT=.
|
OUT_FILE=./alacritty.toml
|
||||||
|
|
||||||
cat "$SRC/base.toml" "$SRC/default.toml" > "$OUT/alacritty.toml"
|
mode="${1:-light}"
|
||||||
cat "$SRC/base.toml" "$SRC/small.toml" > "$OUT/alacritty--small.toml"
|
case "$mode" in
|
||||||
cat "$SRC/base.toml" "$SRC/light.toml" > "$OUT/alacritty--light.toml"
|
light|dark) ;;
|
||||||
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"
|
echo "Usage: $0 [light|dark]" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
theme="$SRC_DIR/$mode.toml"
|
||||||
|
|
||||||
|
cat "$SRC_DIR/base.toml" "$theme" > "$OUT_FILE"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,33 @@ TERM = "alacritty"
|
||||||
animation = "EaseOutExpo"
|
animation = "EaseOutExpo"
|
||||||
duration = 0
|
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]]
|
[[keyboard.bindings]]
|
||||||
action = "Paste"
|
action = "Paste"
|
||||||
key = "V"
|
key = "V"
|
||||||
|
|
|
||||||
|
|
@ -21,30 +21,3 @@ yellow = "#e1a574"
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = "#27292c"
|
background = "#27292c"
|
||||||
foreground = "#a9abaa"
|
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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -25,30 +25,3 @@ yellow = "0x5f8700"
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = "0xeeeeee"
|
background = "0xeeeeee"
|
||||||
foreground = "0x878787"
|
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
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue