linutil/core/tabs/applications-setup/kitty-setup.sh
Jeevitha Kannan K S 1e39d967c5
feat: Alpine linux support (#814)
* Add basic apk to scripts

* Add common service script

* Fix alpine bugs

* Add flatpak installations

* chore: update scripts, add common-service-script to shellcheckrc
2024-11-07 13:03:21 -06:00

37 lines
1.2 KiB
Bash
Executable File

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