linutil/tabs/applications-setup/fastfetch-setup.sh

33 lines
946 B
Bash
Raw Normal View History

2024-09-16 02:11:48 +01:00
#!/bin/sh -e
. ../common-script.sh
2024-09-17 03:10:02 +01:00
installFastfetch() {
echo "Installing Fastfetch..."
2024-09-16 02:11:48 +01:00
if ! command_exists fastfetch; then
case ${PACKAGER} in
pacman)
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm fastfetch
;;
*)
$ESCALATION_TOOL "${PACKAGER}" install -y fastfetch
;;
esac
else
echo "Fastfetch is already installed."
fi
2024-09-16 03:32:57 +01:00
}
setupFastfetchConfig() {
echo "Copying Fastfetch config files..."
2024-09-16 02:11:48 +01:00
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak"
fi
mkdir -p "${HOME}/.config/fastfetch/"
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc
}
checkEnv
checkEscalationTool
2024-09-17 03:10:02 +01:00
installFastfetch
2024-09-16 03:32:57 +01:00
setupFastfetchConfig