RaveOS-arch/rp-os-ae.sh

149 lines
5.7 KiB
Bash
Raw Normal View History

2024-12-19 21:02:20 +00:00
#!/usr/bin/env bash
2024-12-21 19:59:13 +00:00
2024-12-20 20:05:31 +00:00
set -e
2024-12-21 19:59:13 +00:00
2024-12-19 20:51:55 +00:00
# RaveOS Setup Script
2024-12-21 19:59:13 +00:00
# Text Colours
2024-12-19 20:51:55 +00:00
bold=$(tput bold) # ${bold}
normal=$(tput sgr0) # ${normal}
yellow=$(tput setaf 3) # ${yellow}
2024-12-22 21:27:22 +00:00
# Deleting password for the script
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99-t
sudo sed -i 's/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto !autodeps)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto !autodeps)/' /etc/makepkg.conf
# Installing reflector for updating mirrors
2024-12-21 19:03:37 +00:00
2024-12-22 21:31:19 +00:00
sudo pacman -S reflector rsync --noconfirm
2024-12-22 21:27:22 +00:00
sudo reflector -c "Hungary,Austria,Germany,Czech" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
systemctl enable reflector.timer
systemctl start reflector.timer
sudo pacman -Sy
2024-12-22 21:18:49 +00:00
2024-12-22 16:12:53 +00:00
# Installing packages
2024-12-22 21:31:19 +00:00
sudo pacman -S gnome-terminal gnome-session gdm gnome-disk-utility gnome-system-monitor eog flatpak base-devel bash-completion firefox gedit gnome-calculator baobab ffmpeg git gnome-control-center gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland --noconfirm
2024-12-22 16:12:53 +00:00
sudo systemctl enable gdm.service
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target geoclue.service
flatpak installremote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
2024-12-22 21:18:49 +00:00
hblock
2024-12-22 16:12:53 +00:00
2024-12-22 21:27:22 +00:00
# Downloading RavePkg
2024-12-22 16:12:53 +00:00
mkdir cosmetics
sudo chown -R $USER:$GROUP /home/$USER/cosmetics/
cd cosmetics
wget -O cosmetics.zip https://files.rp1.hu/api/public/dl/K7znaGkC/
unzip cosmetics.zip
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si --noconfirm
cd -
rm -rf yay-bin
yay -S gdm-tools --noconfirm --sudoloop --save
git clone https://aur.archlinux.org/yaru.git
cd yaru
makepkg -si --noconfirm
cd -
rm -rf yaru
2024-12-22 21:27:22 +00:00
# Flatseal - Flatpak app jogosultság beállító
echo
echo ---------------------------------------------
echo Installing ${bold}${yellow}Flatseal${normal}
yay -S flatseal --noconfirm
sudo cp -a overrides /home/$USER/.local/share/flatpak
echo ${bold}${yellow}Flatseal ${normal}installed.
echo ---------------------------------------------
echo
2024-12-22 16:12:53 +00:00
echo
echo ---------------------------------------------
echo Installing ${bold}${yellow}CachyOS - Gaming Kernel${normal}
curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
cp /home/$USER/cosmetics/cachyos-repo.sh /home/$USER/cosmetics/cachyos-repo/
sudo ./cachyos-repo.sh
sleep 2
cd -
sudo pacman -S linux-cachyos linux-cachyos-headers --noconfirm
echo ${bold}${yellow}CachyOS - Gaming Kernel ${normal}installed.
echo ---------------------------------------------
echo
# RaveOS Cosmetics
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-purple-dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface icon-theme 'Yaru-purple-dark'
gsettings set org.gnome.desktop.sound theme-name 'Yaru'
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
sudo rsync -ap --info=progress2 gnome-shell /home/$USER/.local/share/
cp -a /home/$USER/cosmetics/burn-my-windows /home/$USER/.config/
sudo cp -a /home/$USER/cosmetics/rave-pp.png /usr/share/pixmaps/faces/
echo "[User]
Session=
Icon=/usr/share/pixmaps/faces/rave-pp.png
SystemAccount=false" | sudo tee /var/lib/AccountsService/users/$USER
sudo cp -a /home/$USER/cosmetics/archlinux-logo-text-dark.svg /usr/share/pixmaps/
sudo cp -a /home/$USER/cosmetics/view-app-grid-symbolic.svg /usr/share/icons/Yaru/scalable/actions/
dconf load / < raveui-eng
sudo mkdir -p /usr/share/backgrounds/
sudo cp -a raveos-bg.png /usr/share/backgrounds/
cp -a /home/$USER/cosmetics/.icons /home/$USER/
cp -a /home/$USER/cosmetics/.themes /home/$USER/
set-gdm-theme set Yaru-purple-dark /usr/share/backgrounds/raveos-bg.png
# Adding Custom rave command
echo ---------------------------------------------
echo Installing ${bold}${yellow}rave command.${normal}
echo
sudo cp -a /home/$USER/cosmetics/rave /usr/local/bin/
sudo chmod +x /usr/local/bin/rave
sudo cp -a /home/$USER/cosmetics/rave-comp.sh /etc/bash_completion.d/
sudo chmod +x /etc/bash_completion.d/rave-comp.sh
echo
echo ${bold}${yellow}Rave command with bash completion ${normal}installed.
echo ---------------------------------------------
# Autostarting ProgramScript after restart
echo ---------------------------------------------
echo Installing ${bold}${yellow}ProgramScript Autostart${normal}
echo
mkdir -p /home/$USER/.config/autostart
sudo chown -R $USER:$GROUP /home/$USER/.config/autostart
sudo cp -a 3progs.sh.desktop /home/$USER/.config/autostart
echo Exec=/home/$USER/.progs/3progs.sh >> /home/$USER/.config/autostart/3progs.sh.desktop
sudo mkdir -p /home/$USER/.progs
sudo chown -R $USER:$GROUP /home/$USER/.progs
sudo cp -a 3progs.sh /home/$USER/.progs
sudo chmod +x /home/$USER/.progs/3progs.sh
sudo cp -a content/. /home/$USER/.progs
echo
echo ${bold}${yellow}ProgramScript Autostart ${normal}installed.
echo ---------------------------------------------
# Cleanup
sudo rm /etc/sudoers.d/99-$USER
sudo rm -rf /home/$USER/cosmetics
2024-12-22 15:21:41 +00:00
2024-12-22 15:12:29 +00:00
# End of script
echo Reboot in 3s...
echo Reboot in 2s...
echo Reboot in 1s...
echo Reboot
reboot