mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-06 05:29:42 +00:00
35 lines
1.2 KiB
Bash
Executable File
35 lines
1.2 KiB
Bash
Executable File
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
setupAlacritty() {
|
|
printf "%b\n" "${YELLOW}Install Alacritty if not already installed...${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" "${RED}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/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
|
|
setupAlacritty
|
|
setupAlacrittyConfig |