Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fastfetch #404

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions tabs/applications-setup/fastfetch-setup.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions tabs/applications-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ script = "rofi-setup.sh"
[[data]]
name = "ZSH Prompt"
script = "zsh-setup.sh"

[[data]]
name = "Fastfetch"
script = "fastfetch-setup.sh"