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"
# 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,12 +123,15 @@ 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 /
@ -146,4 +139,3 @@ snapper -c root create-config /
grub-mkconfig -o /boot/grub/grub.cfg
echo "Done."