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-09-17 03:10:02 +01:00
|
|
|
installAlacritty() {
|
2024-07-15 20:00:04 +01:00
|
|
|
if ! command_exists alacritty; then
|
2024-09-20 15:27:31 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
|
2024-09-17 13:23:23 +01:00
|
|
|
case "$PACKAGER" in
|
2024-07-13 22:44:09 +01:00
|
|
|
pacman)
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
2024-10-05 11:48:53 +01:00
|
|
|
nix-env)
|
|
|
|
"$PACKAGER" -iA nixpkgs.alacritty
|
|
|
|
;;
|
2024-07-13 22:44:09 +01:00
|
|
|
*)
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2024-09-18 19:32:12 +01:00
|
|
|
printf "%b\n" "${GREEN}Alacritty is already installed.${RC}"
|
2024-07-13 22:44:09 +01:00
|
|
|
fi
|
2024-09-16 03:21:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
setupAlacrittyConfig() {
|
2024-09-20 15:27:31 +01:00
|
|
|
printf "%b\n" "${YELLOW}Copying alacritty config files...${RC}"
|
2024-09-15 08:41:49 +01:00
|
|
|
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
|
2024-07-15 20:00:04 +01:00
|
|
|
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/"
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml"
|
2024-09-19 17:59:29 +01:00
|
|
|
curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/keybinds.toml"
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/nordic.toml"
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${GREEN}Alacritty configuration files copied.${RC}"
|
2024-07-13 22:44:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-09-17 03:10:02 +01:00
|
|
|
installAlacritty
|
2024-09-19 17:59:29 +01:00
|
|
|
setupAlacrittyConfig
|