linutil/core/tabs/applications-setup/alacritty-setup.sh
Adam Perkowski 216f1a4836
Restructure the crates (#549)
* BIG CHANGES

* core metadata

* Added readme.md to the package

* Moved the crate back to tui

Co-authored-by: Liam <lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <lj3954@users.noreply.github.com>
2024-09-19 19:09:53 -05:00

37 lines
1.3 KiB
Bash
Executable File

#!/bin/sh -e
. ../common-script.sh
installAlacritty() {
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
if ! command_exists alacritty; then
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
;;
esac
else
printf "%b\n" "${GREEN}Alacritty is already installed.${RC}"
fi
}
setupAlacrittyConfig() {
printf "%b\n" "${YELLOW}Copy alacritty config files${RC}"
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
fi
mkdir -p "${HOME}/.config/alacritty/"
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml"
curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/keybinds.toml"
curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/nordic.toml"
printf "%b\n" "${GREEN}Alacritty configuration files copied.${RC}"
}
checkEnv
checkEscalationTool
installAlacritty
setupAlacrittyConfig