aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-23 18:51:22 +0300
committerEgor Tensin <egor@tensin.name>2026-10-23 18:51:22 +0300
commit690f8abc4c1521bd92e98c095c319e8696d45f6d (patch)
tree0b47e9a766984874fee08f538c3da083eab6108f /scripts
parentscripts: vim_plugins.sh -> vim.sh (diff)
downloadlinux-home-690f8abc4c1521bd92e98c095c319e8696d45f6d.tar.gz
linux-home-690f8abc4c1521bd92e98c095c319e8696d45f6d.zip
scripts: add themes for Alacritty
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/alacritty.sh29
-rwxr-xr-xscripts/setup.sh5
-rwxr-xr-xscripts/vim.sh4
3 files changed, 34 insertions, 4 deletions
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