From a8343702ce730897343c09c4901a54e49e68d61d Mon Sep 17 00:00:00 2001 From: Baltrust Date: Wed, 30 Sep 2026 03:12:03 +0300 Subject: [PATCH] Update after.sh --- after.sh | 83 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/after.sh b/after.sh index 473d06e..fa49a41 100644 --- a/after.sh +++ b/after.sh @@ -9,38 +9,78 @@ if ! id "$USERNAME" &>/dev/null; then exit 1 fi -# misc stuff -# PACMAN LOVES CANDY -sed -i '/^# Misc options/a ILoveCandy' /etc/pacman.conf -# DISABLE KWALLETD -mkdir -p "/home/$USERNAME/.config" +USER_HOME="/home/$USERNAME" -cat > "/home/$USERNAME/.config/kwalletrc" <<'EOF' +# Verify the user's home directory +if [ ! -d "$USER_HOME" ]; then + echo "Error: $USER_HOME does not exist." + exit 1 +fi + +# Make sure the user's home belongs to the user +chown "$USERNAME:$USERNAME" "$USER_HOME" + +# ───────────────────────────────────── +# Misc +# ───────────────────────────────────── + +# PACMAN LOVES CANDY +grep -qxF 'ILoveCandy' /etc/pacman.conf || \ + sed -i '/^# Misc options/a ILoveCandy' /etc/pacman.conf + +# DISABLE KWALLETD +mkdir -p "$USER_HOME/.config" + +cat > "$USER_HOME/.config/kwalletrc" <<'EOF' [Wallet] Enabled=false EOF -chown "$USERNAME:$USERNAME" "/home/$USERNAME/.config/kwalletrc" # ENABLE DOLPHIN STORAGE INFO -kwriteconfig6 --file ~/.config/dolphinrc --group General --key ShowStatusBar FullWidth +sudo -u "$USERNAME" kwriteconfig6 \ + --file "$USER_HOME/.config/dolphinrc" \ + --group General \ + --key ShowStatusBar \ + FullWidth + +# Fix ownership of everything we created +chown -R "$USERNAME:$USERNAME" "$USER_HOME/.config" + +# ───────────────────────────────────── +# Install yay +# ───────────────────────────────────── -# INSTALL YAY pacman -S --needed --noconfirm git base-devel su - "$USERNAME" <<'EOF' + git clone https://aur.archlinux.org/yay.git + cd yay + makepkg -si --noconfirm + # INSTALL AUR PACKAGES -yay -S --needed --noconfirm --removemake zsh-theme-powerlevel10k ttf-meslo-nerd coolercontrol-bin mangojuice heroic-games-launcher-bin polymc-qt5-bin open-video-downloader-bin brave-bin onlyoffice-bin +yay -S --needed --noconfirm --removemake \ + zsh-theme-powerlevel10k \ + ttf-meslo-nerd \ + coolercontrol-bin \ + mangojuice \ + heroic-games-launcher-bin \ + polymc-qt5-bin \ + open-video-downloader-bin \ + brave-bin \ + onlyoffice-bin + EOF +# ───────────────────────────────────── +# ZSH +# ───────────────────────────────────── -# SET UP ZSH WITH P10K +chsh -s /bin/zsh "$USERNAME" -chsh -s /bin/zsh - -cat > "/home/$USERNAME/.zshrc" <<'EOF' +cat > "$USER_HOME/.zshrc" <<'EOF' # ───────────────────────────────────── # Powerlevel10k # ───────────────────────────────────── @@ -93,11 +133,16 @@ setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE EOF -chown "$USERNAME:$USERNAME" "/home/$USERNAME/.zshrc" +chown "$USERNAME:$USERNAME" "$USER_HOME/.zshrc" -# SET UP BACKUPS -systemctl enable --now grub-btrfsd # enabling grub menu entries -snapper -c root create-config / # generate a root conf file -grub-mkconfig -o /boot/grub/grub.cfg # load the options in grub menu +# ───────────────────────────────────── +# Backups +# ───────────────────────────────────── + +systemctl enable grub-btrfsd + +snapper -c root create-config / + +grub-mkconfig -o /boot/grub/grub.cfg echo "Done." \ No newline at end of file