Skip to content

Commit

Permalink
Phase 3: Add fastfetch & fix alacritty
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Sep 19, 2024
1 parent 588123d commit 41e3730
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
4 changes: 3 additions & 1 deletion tabs/applications-setup/alacritty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ setupAlacrittyConfig() {
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
fi
printf "%b\n" "${GREEN}Alacritty configuration files backed up.${RC}"
else
printf "%b\n" "${GREEN}Skipping backup of Alacritty configuration files.${RC}"
fi
mkdir -p "${HOME}/.config/alacritty/"
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml"
curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/keybinds.toml"
curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/nordic.toml"
printf "%b\n" "${GREEN}Alacritty configuration files backed up.${RC}"
}

checkEnv
Expand Down
41 changes: 27 additions & 14 deletions tabs/applications-setup/fastfetch-setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,38 @@
. ../common-script.sh

installFastfetch() {
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
if ! command_exists fastfetch; then
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
;;
esac
printf "%b" "${YELLOW}Do you want to install Fastfetch? (Y/n): ${RC}"
read -r install_choice
if [ "$install_choice" != "n" ] && [ "$install_choice" != "N" ]; then
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
if ! command_exists fastfetch; then
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
;;
esac
else
printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}"
fi
else
printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}"
printf "%b\n" "${GREEN}Skipping Fastfetch installation.${RC}"
fi
}

setupFastfetchConfig() {
printf "%b\n" "${YELLOW}Copying Fastfetch config files...${RC}"
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak"
printf "%b" "${YELLOW}Do you want to backup existing Fastfetch configuration files? (Y/n): ${RC}"
read -r backup_choice
if [ "$backup_choice" != "n" ] && [ "$backup_choice" != "N" ]; then
printf "%b\n" "${YELLOW}Backing up existing Fastfetch configuration files...${RC}"
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak"
fi
printf "%b\n" "${GREEN}Fastfetch configuration files backed up.${RC}"
else
printf "%b\n" "${GREEN}Skipping backup of Fastfetch configuration files.${RC}"
fi
mkdir -p "${HOME}/.config/fastfetch/"
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc
Expand Down

0 comments on commit 41e3730

Please sign in to comment.