diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh new file mode 100644 index 00000000..e3f9a4f7 --- /dev/null +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../common-script.sh + +setupFastfetch() { + echo "Installing Fastfetch if not already installed..." + 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 +} + +setupFastfetchConfig() { + echo "Copying Fastfetch config files..." + 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 +setupFastfetch +setupFastfetchConfig \ No newline at end of file diff --git a/tabs/applications-setup/tab_data.toml b/tabs/applications-setup/tab_data.toml index 39cbd30e..ce8f1b92 100644 --- a/tabs/applications-setup/tab_data.toml +++ b/tabs/applications-setup/tab_data.toml @@ -27,3 +27,7 @@ script = "rofi-setup.sh" [[data]] name = "ZSH Prompt" script = "zsh-setup.sh" + +[[data]] +name = "Fastfetch" +script = "fastfetch-setup.sh" \ No newline at end of file