forked from ChrisTitusTech/linutil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ChrisTitusTech#404 from nnyyxxxx/testing-15
Add fastfetch
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters