mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 22:14:28 +00:00
1e39d967c5
* Add basic apk to scripts * Add common service script * Fix alpine bugs * Add flatpak installations * chore: update scripts, add common-service-script to shellcheckrc
40 lines
1.4 KiB
Bash
Executable File
40 lines
1.4 KiB
Bash
Executable File
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
installAlacritty() {
|
|
if ! command_exists alacritty; then
|
|
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
|
|
case "$PACKAGER" in
|
|
pacman)
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
|
|
;;
|
|
apk)
|
|
"$ESCALATION_TOOL" "$PACKAGER" add alacritty
|
|
;;
|
|
*)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
|
|
;;
|
|
esac
|
|
else
|
|
printf "%b\n" "${GREEN}Alacritty is already installed.${RC}"
|
|
fi
|
|
}
|
|
|
|
setupAlacrittyConfig() {
|
|
printf "%b\n" "${YELLOW}Copying 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
|