2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-07-28 16:32:05 +01:00
|
|
|
|
2024-07-15 20:00:04 +01:00
|
|
|
setupAlacritty() {
|
|
|
|
echo "Install Alacritty if not already installed..."
|
|
|
|
if ! command_exists alacritty; then
|
2024-07-13 22:44:09 +01:00
|
|
|
case ${PACKAGER} in
|
|
|
|
pacman)
|
2024-08-12 15:46:48 +01:00
|
|
|
sudo ${PACKAGER} -S --needed --noconfirm alacritty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-07-15 20:00:04 +01:00
|
|
|
sudo ${PACKAGER} install -y alacritty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2024-07-15 20:00:04 +01:00
|
|
|
echo "alacritty is already installed."
|
2024-07-13 22:44:09 +01:00
|
|
|
fi
|
2024-07-15 20:00:04 +01:00
|
|
|
echo "Copy alacritty config files"
|
|
|
|
if [ -d "${HOME}/.config/alacritty" ]; then
|
|
|
|
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
|
2024-07-13 22:44:09 +01:00
|
|
|
fi
|
2024-07-15 20:00:04 +01:00
|
|
|
mkdir -p "${HOME}/.config/alacritty/"
|
|
|
|
wget -O "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml"
|
|
|
|
wget -O "${HOME}/.config/alacritty/nordic.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/nordic.toml"
|
2024-07-13 22:44:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-07-15 22:26:03 +01:00
|
|
|
setupAlacritty
|