Skip to content

Commit

Permalink
feat: add host-based configuration for alacritty
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Dec 21, 2024
1 parent e733076 commit acda402
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions alacritty/alacritty.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[general]
live_config_reload = true
import = [
"themes/themes/doom_one.toml"
"themes/themes/doom_one.toml",
"host.toml",
]

[cursor]
Expand All @@ -14,7 +15,6 @@ shape = "Beam"

[font]
builtin_box_drawing = true
size = 10

[font.bold]
family = "JetBrainsMono Nerd Font"
Expand Down
2 changes: 2 additions & 0 deletions alacritty/host.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[font]
size = 10
2 changes: 2 additions & 0 deletions alacritty/x-wing.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[font]
size = 9
12 changes: 10 additions & 2 deletions scripts/alacritty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ main_pacman() {
main() {
configfile alacritty

mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes
mkdir -p "$HOME/.config/alacritty/themes"
if [ ! -d "$HOME/.config/alacritty/themes" ]; then
git clone https://github.com/alacritty/alacritty-theme "$HOME/.config/alacritty/themes"
fi

if [ -f "$root/alacritty/$HOSTNAME.toml" ]; then
git update-index --assume-unchanged "$root/alacritty/host.toml"
rm "$root/alacritty/host.toml"
ln -s "$HOSTNAME.toml" "$root/alacritty/host.toml"
fi
}

0 comments on commit acda402

Please sign in to comment.