Update after.sh

This commit is contained in:
Baltrust 2026-09-30 03:12:03 +03:00
parent fa88486894
commit a8343702ce

View file

@ -9,38 +9,78 @@ if ! id "$USERNAME" &>/dev/null; then
exit 1 exit 1
fi fi
# misc stuff USER_HOME="/home/$USERNAME"
# PACMAN LOVES CANDY
sed -i '/^# Misc options/a ILoveCandy' /etc/pacman.conf
# DISABLE KWALLETD
mkdir -p "/home/$USERNAME/.config"
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] [Wallet]
Enabled=false Enabled=false
EOF EOF
chown "$USERNAME:$USERNAME" "/home/$USERNAME/.config/kwalletrc"
# ENABLE DOLPHIN STORAGE INFO # 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 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 # 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 EOF
# ─────────────────────────────────────
# ZSH
# ─────────────────────────────────────
# SET UP ZSH WITH P10K chsh -s /bin/zsh "$USERNAME"
chsh -s /bin/zsh cat > "$USER_HOME/.zshrc" <<'EOF'
cat > "/home/$USERNAME/.zshrc" <<'EOF'
# ───────────────────────────────────── # ─────────────────────────────────────
# Powerlevel10k # Powerlevel10k
# ───────────────────────────────────── # ─────────────────────────────────────
@ -93,11 +133,16 @@ setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE setopt HIST_IGNORE_SPACE
EOF 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 # Backups
snapper -c root create-config / # generate a root conf file # ─────────────────────────────────────
grub-mkconfig -o /boot/grub/grub.cfg # load the options in grub menu
systemctl enable grub-btrfsd
snapper -c root create-config /
grub-mkconfig -o /boot/grub/grub.cfg
echo "Done." echo "Done."