mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 12:59:45 +00:00
30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
setupAlacritty() {
|
|
echo "Install Alacritty if not already installed..."
|
|
if ! command_exists alacritty; then
|
|
case ${PACKAGER} in
|
|
pacman)
|
|
$ESCALATION_TOOL ${PACKAGER} -S --needed --noconfirm alacritty
|
|
;;
|
|
*)
|
|
$ESCALATION_TOOL ${PACKAGER} install -y alacritty
|
|
;;
|
|
esac
|
|
else
|
|
echo "alacritty is already installed."
|
|
fi
|
|
echo "Copy alacritty config files"
|
|
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/"
|
|
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"
|
|
}
|
|
|
|
checkEnv
|
|
checkEscalationTool
|
|
setupAlacritty |