2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-07-28 16:32:05 +01:00
|
|
|
|
2024-07-13 22:44:09 +01:00
|
|
|
setupKitty() {
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${YELLOW}Install Kitty if not already installed...${RC}"
|
2024-07-13 22:44:09 +01:00
|
|
|
if ! command_exists kitty; then
|
|
|
|
case ${PACKAGER} in
|
|
|
|
pacman)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm kitty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL "${PACKAGER}" install -y kitty
|
2024-07-13 22:44:09 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${GREEN}Kitty is already installed.${RC}"
|
2024-07-13 22:44:09 +01:00
|
|
|
fi
|
2024-09-16 03:21:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
setupKittyConfig() {
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${YELLOW}Copy Kitty config files${RC}"
|
2024-09-15 08:41:49 +01:00
|
|
|
if [ -d "${HOME}/.config/kitty" ] && [ ! -d "${HOME}/.config/kitty-bak" ]; then
|
2024-08-23 14:12:47 +01:00
|
|
|
cp -r "${HOME}/.config/kitty" "${HOME}/.config/kitty-bak"
|
2024-07-13 22:44:09 +01:00
|
|
|
fi
|
2024-08-23 14:12:47 +01:00
|
|
|
mkdir -p "${HOME}/.config/kitty/"
|
2024-09-12 21:02:00 +01:00
|
|
|
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
|
2024-07-13 22:44:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-07-15 22:26:03 +01:00
|
|
|
setupKitty
|
2024-09-16 03:21:22 +01:00
|
|
|
setupKittyConfig
|