From 690f8abc4c1521bd92e98c095c319e8696d45f6d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 23 Oct 2026 18:51:22 +0300 Subject: scripts: add themes for Alacritty --- scripts/alacritty.sh | 29 +++++++++++++++++++++++++++++ scripts/setup.sh | 5 +++-- scripts/vim.sh | 4 ++-- 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100755 scripts/alacritty.sh (limited to 'scripts') diff --git a/scripts/alacritty.sh b/scripts/alacritty.sh new file mode 100755 index 0000000..56d47f6 --- /dev/null +++ b/scripts/alacritty.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail +shopt -s inherit_errexit 2> /dev/null || true +shopt -s lastpipe + +config_dir="$HOME/.config/alacritty" +readonly config_dir + +pull() { + local themes_dir + themes_dir="$config_dir/themes" + local themes_url='https://github.com/alacritty/alacritty-theme.git' + + if [ -d "$themes_dir" ]; then + echo "Updating themes for alacritty" + git -C "$themes_dir" pull + else + echo "Installing themes for alacritty" + git clone -q "$themes_url" "$themes_dir" + fi +} + +main() { + mkdir -p -- "$config_dir" + pull +} + +main diff --git a/scripts/setup.sh b/scripts/setup.sh index 7f9f9c2..ae04fb5 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -50,7 +50,8 @@ links_update() { links-chmod go-w } -post_update() { +pre_update() { + "$script_dir/alacritty.sh" "$script_dir/vim.sh" # Remove ~/.ssh/known_hosts, I don't use it (and have a corresponding @@ -59,9 +60,9 @@ post_update() { } main() { + pre_update config_links_in_path links_update - post_update } main diff --git a/scripts/vim.sh b/scripts/vim.sh index 3801b74..73355f1 100755 --- a/scripts/vim.sh +++ b/scripts/vim.sh @@ -19,10 +19,10 @@ pull() { name="${plugin#*/}" if [ -d "$name" ]; then - echo "Updating plugin: $plugin" + echo "Updating vim plugin: $plugin" git -C "$name" pull else - echo "Installing plugin: $plugin" + echo "Installing vim plugin: $plugin" git clone -q "https://github.com/$plugin.git" fi done -- cgit v1.3