diff --git a/after.sh b/after.sh index 18459aa..5e91244 100644 --- a/after.sh +++ b/after.sh @@ -11,14 +11,8 @@ fi USER_HOME="/home/$USERNAME" -# 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" +echo "Using user: $USERNAME" +echo # ───────────────────────────────────── # Misc @@ -37,30 +31,25 @@ Enabled=false EOF # ENABLE DOLPHIN STORAGE INFO -sudo -u "$USERNAME" kwriteconfig6 \ +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 # ───────────────────────────────────── +echo "Installing 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 \ @@ -71,13 +60,14 @@ yay -S --needed --noconfirm --removemake \ open-video-downloader-bin \ brave-bin \ onlyoffice-bin - EOF # ───────────────────────────────────── # ZSH # ───────────────────────────────────── +echo "Configuring Zsh..." + chsh -s /bin/zsh "$USERNAME" cat > "$USER_HOME/.zshrc" <<'EOF' @@ -133,17 +123,19 @@ setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE EOF -chown "$USERNAME:$USERNAME" "$USER_HOME/.zshrc" +# Make everything we created belong to the user +chown -R "$USERNAME:$USERNAME" "$USER_HOME" # ───────────────────────────────────── # Backups # ───────────────────────────────────── +echo "Configuring Snapper and GRUB..." + systemctl enable grub-btrfsd snapper -c root create-config / grub-mkconfig -o /boot/grub/grub.cfg -echo "Done." - +echo "Done." \ No newline at end of file