Update after.sh

This commit is contained in:
Baltrust 2026-09-30 03:20:29 +03:00
parent d4fbaf9851
commit 11f044ce0c

View file

@ -11,14 +11,8 @@ fi
USER_HOME="/home/$USERNAME" USER_HOME="/home/$USERNAME"
# Verify the user's home directory echo "Using user: $USERNAME"
if [ ! -d "$USER_HOME" ]; then echo
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 # Misc
@ -37,30 +31,25 @@ Enabled=false
EOF EOF
# ENABLE DOLPHIN STORAGE INFO # ENABLE DOLPHIN STORAGE INFO
sudo -u "$USERNAME" kwriteconfig6 \ kwriteconfig6 \
--file "$USER_HOME/.config/dolphinrc" \ --file "$USER_HOME/.config/dolphinrc" \
--group General \ --group General \
--key ShowStatusBar \ --key ShowStatusBar \
FullWidth FullWidth
# Fix ownership of everything we created
chown -R "$USERNAME:$USERNAME" "$USER_HOME/.config"
# ───────────────────────────────────── # ─────────────────────────────────────
# Install yay # Install yay
# ───────────────────────────────────── # ─────────────────────────────────────
echo "Installing yay..."
pacman -S --needed --noconfirm git base-devel pacman -S --needed --noconfirm git base-devel
su - "$USERNAME" <<'EOF' su - "$USERNAME" <<'EOF'
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay cd yay
makepkg -si --noconfirm makepkg -si --noconfirm
# INSTALL AUR PACKAGES
yay -S --needed --noconfirm --removemake \ yay -S --needed --noconfirm --removemake \
zsh-theme-powerlevel10k \ zsh-theme-powerlevel10k \
ttf-meslo-nerd \ ttf-meslo-nerd \
@ -71,13 +60,14 @@ yay -S --needed --noconfirm --removemake \
open-video-downloader-bin \ open-video-downloader-bin \
brave-bin \ brave-bin \
onlyoffice-bin onlyoffice-bin
EOF EOF
# ───────────────────────────────────── # ─────────────────────────────────────
# ZSH # ZSH
# ───────────────────────────────────── # ─────────────────────────────────────
echo "Configuring Zsh..."
chsh -s /bin/zsh "$USERNAME" chsh -s /bin/zsh "$USERNAME"
cat > "$USER_HOME/.zshrc" <<'EOF' cat > "$USER_HOME/.zshrc" <<'EOF'
@ -133,12 +123,15 @@ setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE setopt HIST_IGNORE_SPACE
EOF EOF
chown "$USERNAME:$USERNAME" "$USER_HOME/.zshrc" # Make everything we created belong to the user
chown -R "$USERNAME:$USERNAME" "$USER_HOME"
# ───────────────────────────────────── # ─────────────────────────────────────
# Backups # Backups
# ───────────────────────────────────── # ─────────────────────────────────────
echo "Configuring Snapper and GRUB..."
systemctl enable grub-btrfsd systemctl enable grub-btrfsd
snapper -c root create-config / snapper -c root create-config /
@ -146,4 +139,3 @@ snapper -c root create-config /
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
echo "Done." echo "Done."