linutil/src/commands/applications-setup/alacritty-setup.sh

31 lines
1010 B
Bash
Raw Normal View History

2024-07-15 20:00:04 +01:00
#!/bin/sh -e
. ../common-script.sh
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-23 14:12:47 +01:00
$ESCALATION_TOOL ${PACKAGER} -S --needed --noconfirm alacritty
2024-07-13 22:44:09 +01:00
;;
*)
2024-08-23 14:12:47 +01:00
$ESCALATION_TOOL ${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-08-23 14:12:47 +01:00
checkEscalationTool
setupAlacritty