From 4b3da303281a8ab70246de1422e489dc219a2fad Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sun, 15 Sep 2024 21:11:48 -0400 Subject: [PATCH 1/4] Add fastfetch --- tabs/applications-setup/fastfetch-setup.sh | 29 ++++++++++++++++++++++ tabs/applications-setup/tab_data.toml | 4 +++ 2 files changed, 33 insertions(+) create mode 100644 tabs/applications-setup/fastfetch-setup.sh diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh new file mode 100644 index 00000000..6f3dcba7 --- /dev/null +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -0,0 +1,29 @@ +#!/bin/sh -e + +. ../common-script.sh + +setupFastfetch() { + echo "Install 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 + echo "Copy 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 \ No newline at end of file diff --git a/tabs/applications-setup/tab_data.toml b/tabs/applications-setup/tab_data.toml index 2ad73892..bf1cb915 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 From df71b2c5a0e0d19285ccb383e4d81fcf5ea6da1b Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Sun, 15 Sep 2024 22:32:57 -0400 Subject: [PATCH 2/4] Implement changes proposed in #409 --- tabs/applications-setup/fastfetch-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh index 6f3dcba7..9d68fb01 100644 --- a/tabs/applications-setup/fastfetch-setup.sh +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -16,6 +16,9 @@ setupFastfetch() { else echo "Fastfetch is already installed." fi +} + +setupFastfetchConfig() { echo "Copy Fastfetch config files" if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak" @@ -26,4 +29,5 @@ setupFastfetch() { checkEnv checkEscalationTool -setupFastfetch \ No newline at end of file +setupFastfetch +setupFastfetchConfig \ No newline at end of file From 1b904c379de0928b1be646824eaf6a0216f00a81 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Mon, 16 Sep 2024 17:03:32 -0500 Subject: [PATCH 3/4] Update tabs/applications-setup/fastfetch-setup.sh Co-authored-by: Adam Perkowski --- tabs/applications-setup/fastfetch-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh index 9d68fb01..ae3f00b2 100644 --- a/tabs/applications-setup/fastfetch-setup.sh +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -3,7 +3,7 @@ . ../common-script.sh setupFastfetch() { - echo "Install Fastfetch if not already installed..." + echo "Installing Fastfetch if not already installed..." if ! command_exists fastfetch; then case ${PACKAGER} in pacman) From 66e8040bc73c27aafee96969eaae6bfa8088ecbe Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Mon, 16 Sep 2024 17:03:40 -0500 Subject: [PATCH 4/4] Update tabs/applications-setup/fastfetch-setup.sh Co-authored-by: Adam Perkowski --- tabs/applications-setup/fastfetch-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh index ae3f00b2..e3f9a4f7 100644 --- a/tabs/applications-setup/fastfetch-setup.sh +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -19,7 +19,7 @@ setupFastfetch() { } setupFastfetchConfig() { - echo "Copy Fastfetch config files" + 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