261 lines
8.1 KiB
Bash
261 lines
8.1 KiB
Bash
#!/bin/bash
|
|
## Stop on error
|
|
#set -e
|
|
|
|
#chmod +x fájl/helye/és/maga/a/fájl.sh
|
|
#Futtatás: fájl/helye/és/maga/a/fájl.sh
|
|
|
|
##################################################################################################################
|
|
# Arch scriptek:
|
|
#https://github.com/arcolinuxd/arco-plasma
|
|
#https://github.com/erikdubois/arcolinux-nemesis
|
|
|
|
#tput setaf 0 = black
|
|
#tput setaf 1 = red
|
|
#tput setaf 2 = green
|
|
#tput setaf 3 = yellow
|
|
#tput setaf 4 = dark blue
|
|
#tput setaf 5 = purple
|
|
#tput setaf 6 = cyan
|
|
#tput setaf 7 = gray
|
|
#tput setaf 8 = light blue
|
|
#tput sgr0 = normal
|
|
#tput bold = bold
|
|
bold=$(tput bold) # ${bold}
|
|
normal=$(tput sgr0) # ${normal}
|
|
yellow=$(tput setaf 3) # ${yellow}
|
|
##################################################################################################################
|
|
|
|
# Variables - Credit Lordify
|
|
CPU=$(lscpu | grep "AMD" -c)
|
|
nVidia=$(lspci -P | grep "NVIDIA" -c)
|
|
Locale=$(echo $LANG)
|
|
|
|
## Információk a script futtatásához és a kezdő lépések
|
|
|
|
tput setaf 3
|
|
echo "Manjaro 24.2 MINIMAL-hoz igazított script. 2025.01"
|
|
tput sgr0
|
|
|
|
sudo lsb_release -a
|
|
tput sgr0
|
|
sleep 4
|
|
## rendszer frissítés és zenity ablakmegjelenítő
|
|
sudo pacman -Syyu --noconfirm
|
|
|
|
|
|
## Arch beállítások finomítása
|
|
tput setaf 3
|
|
echo párhuzamos letöltések
|
|
tput sgr0
|
|
sudo chown -R $USER:$USER ~
|
|
sudo sed -i 's/MaxParallelDownloads = 4/MaxParallelDownloads = 8/' /etc/pacman.conf
|
|
echo ---------------------------------------------
|
|
|
|
|
|
tput setaf 3
|
|
echo Processzor kihasználás összesmagra
|
|
tput sgr0
|
|
|
|
numberofcores=$(grep -c ^processor /proc/cpuinfo)
|
|
|
|
if [ $numberofcores -gt 1 ]
|
|
then
|
|
echo "You have " $numberofcores" cores."
|
|
echo "Changing the makeflags for "$numberofcores" cores."
|
|
sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j'$(($numberofcores+1))'"/g' /etc/makepkg.conf;
|
|
echo "Changing the compression settings for "$numberofcores" cores."
|
|
sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T '"$numberofcores"' -z -)/g' /etc/makepkg.conf
|
|
else
|
|
echo "No change."
|
|
fi
|
|
echo ---------------------------------------------
|
|
|
|
|
|
tput setaf 3
|
|
echo Aur tároló engedélyezése
|
|
tput sgr0
|
|
|
|
sudo sed -Ei '/EnableAUR/s/^#//' /etc/pamac.conf
|
|
sudo sed -Ei '/CheckAURUpdates/s/^#//' /etc/pamac.conf
|
|
echo ---------------------------------------------
|
|
|
|
# Enable x86
|
|
tput setaf 3
|
|
echo Enabling x86 architecture arch-nál és nem manjaronál.
|
|
tput sgr0
|
|
|
|
sudo sed -Ei '/[multilib]/s/^#//' /etc/pamac.conf
|
|
sudo sed -Ei '/SigLevel = PackageRequired/s/^#//' /etc/pamac.conf
|
|
sudo sed -Ei '/Include = /etc/pacman.d/mirrorlist/s/^#//' /etc/pamac.conf
|
|
echo ---------------------------------------------
|
|
|
|
#Alapprogramok
|
|
tput setaf 3
|
|
echo Alapprogramok
|
|
tput sgr0
|
|
|
|
sudo pacman -S --noconfirm --needed eog flatpak base-devel bash-completion ffmpeg git gsfonts adobe-source-sans-fonts cantarell-fonts noto-fonts ttf-bitstream-vera ttf-dejavu ttf-droid ttf-hack ttf-inconsolata ttf-liberation ttf-roboto ttf-ubuntu-font-family unzip unace unrar zip wget glib2 glib2-devel spice-vdagent hblock nano qt6-wayland meson rsync zenity amd-ucode intel-ucode mesa-utils gvfs gvfs-smb wmctrl zsh python-setuptools sharutils uudeview arj cabextract yay clamav cronie clamtk partitionmanager
|
|
|
|
echo ---------------------------------------------
|
|
|
|
|
|
#cosmetics
|
|
tput setaf 3
|
|
echo cosmetics
|
|
tput sgr0
|
|
|
|
wget -O cosmetics.zip https://files.rp1.hu/api/public/dl/K7znaGkC/
|
|
unzip -n cosmetics.zip
|
|
echo ---------------------------------------------
|
|
|
|
|
|
# Disabling Geoclue
|
|
tput setaf 3
|
|
echo Geoclue service disabling / masking
|
|
tput sgr0
|
|
|
|
#sudo systemctl disable geoclue.service
|
|
sudo systemctl mask suspend.target hibernate.target hybrid-sleep.target geoclue.service
|
|
echo ---------------------------------------------
|
|
|
|
|
|
|
|
# Alapprogramok beállításai
|
|
tput setaf 3
|
|
echo Alapprogramok beállításai
|
|
tput sgr0
|
|
|
|
#yakuake auto inditása
|
|
sudo cp -a /usr/share/applications/org.kde.yakuake.desktop /home/$USER/.config/autostart
|
|
echo "[Dialogs]
|
|
FirstRun=false" > /home/$USER/.config/yakuakerc
|
|
|
|
#Clamav frissítés
|
|
sudo freshclam
|
|
sudo systemctl enable --now clamav-daemon
|
|
sudo systemctl enable --now clamav-freshclam
|
|
|
|
echo ---------------------------------------------
|
|
|
|
|
|
# Cosmetics
|
|
tput setaf 3
|
|
echo Setting correct Theme
|
|
tput sgr0
|
|
|
|
#Setting KDE Dark Theme
|
|
lookandfeeltool -a org.manjaro.breath-dark.desktop
|
|
#KDE settings
|
|
kwriteconfig6 --file $HOME/.config/kwinrc --group org.kde.kdecoration2 --key ButtonsOnLeft "MSF"
|
|
#Csak egy virtuális asztal
|
|
sudo sed -i /Id_2=/d /home/$USER/.config/kwinrc
|
|
sudo sed -i 's/Rows=2/Rows=1/' /home/$USER/.config/kwinrc
|
|
sudo sed -i '/Rows=1/i Number=1' /home/$USER/.config/kwinrc
|
|
#Energiagazdálkodás
|
|
echo "[AC][Display]
|
|
DimDisplayIdleTimeoutSec=1200
|
|
TurnOffDisplayIdleTimeoutSec=1800
|
|
|
|
[AC][SuspendAndShutdown]
|
|
AutoSuspendAction=0
|
|
PowerButtonAction=8" > /home/$USER/.config/powerdevilrc
|
|
|
|
#sudo touch "/home/$USER/.config/powerdevilrc"
|
|
#kwriteconfig6 --file /home/$USER/.config/powerdevilrc --group AC --group Display --key DimDisplayIdleTimeoutSec=1200
|
|
#kwriteconfig6 --file $USER/.config/powerdevilrc --group AC --group Display --key TurnOffDisplayIdleTimeoutSec=1800
|
|
#kwriteconfig6 --file $USER/.config/powerdevilrc --group AC --group SuspendAndShutdown --key AutoSuspendAction=0
|
|
#kwriteconfig6 --file $USER/.config/powerdevilrc --group AC --group SuspendAndShutdown --key PowerButtonAction=8
|
|
|
|
|
|
#profil kép beállítás és háttérképek beállítás
|
|
sudo cp -a rave-pp.png /usr/share/sddm/faces/
|
|
sudo mv /usr/share/sddm/faces/rave-pp.png /usr/share/sddm/faces/$USER.face.icon
|
|
|
|
sudo cp -a raveos-bg.png /usr/share/wallpapers/
|
|
plasma-apply-wallpaperimage /usr/share/wallpapers/raveos-bg.png
|
|
kwriteconfig6 --file kscreenlockerrc --group Greeter --group Wallpaper --group org.kde.image --group General --key Image "file:///usr/share/wallpapers/raveos-bg.png"
|
|
sudo cp -a archlinux-logo-text-dark.svg /usr/share/pixmaps/
|
|
sudo mv /usr/share/pixmaps/archlinux-logo-text-dark.svg /usr/share/pixmaps/manjaro-logo-text-dark.svg
|
|
|
|
|
|
# Autostarting ProgramScript after restart
|
|
tput setaf 3
|
|
echo ProgramScript Autostart
|
|
tput sgr0
|
|
|
|
mkdir -p /home/$USER/.config/autostart
|
|
sudo chown -R $USER:$GROUP /home/$USER/.config/autostart
|
|
|
|
echo Changed ownership to $USER /home/$USER/.config/autostart
|
|
sudo rsync -ap --info=progress2 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
|
|
echo Created .progs folder
|
|
sudo chown -R $USER:$GROUP /home/$USER/.progs
|
|
echo Changed ownership to $USER /home/$USER/.progs
|
|
sudo rsync -ap --info=progress2 3progs.sh /home/$USER/.progs
|
|
sudo chmod +x /home/$USER/.progs/3progs.sh
|
|
echo Changed ownership to $USER /home/$USER/.progs/3progs.sh
|
|
sudo rsync -ap --info=progress2 content/. /home/$USER/.progs
|
|
|
|
echo ---------------------------------------------
|
|
|
|
|
|
|
|
# Takarítás és frissítés
|
|
tput setaf 3
|
|
echo Takarítás és frissítés
|
|
tput sgr0
|
|
|
|
#takarítók
|
|
sudo pacman -Sc --noconfirm
|
|
sudo yay -Sc --noconfirm
|
|
sudo pacman -Scc --noconfirm
|
|
|
|
sudo pacman -Syyu --noconfirm
|
|
yay -Syu --noconfirm
|
|
|
|
echo ---------------------------------------------
|
|
|
|
|
|
# Nyelvi csomagfájlok
|
|
tput setaf 3
|
|
echo Nyelvi csomagfájlok
|
|
tput sgr0
|
|
|
|
sudo pacman -S --noconfirm --needed man-pages-hu poppler-data firefox-i18n-en-us firefox-i18n-hu hunspell-en_us hunspell-hu hyphen-en hyphen-hu
|
|
|
|
echo ---------------------------------------------
|
|
|
|
|
|
sudo chown -R $USER:$USER ~
|
|
# Script end
|
|
|
|
(
|
|
echo "0" ;
|
|
echo "# Újraindítás 5s" ; sleep 1
|
|
echo "20" ;
|
|
echo "# Újraindítás 4s" ; sleep 1
|
|
echo "40" ;
|
|
echo "# Újraindítás 3s" ; sleep 1
|
|
echo "60" ;
|
|
echo "# Újraindítás 2s" ; sleep 1
|
|
echo "80" ;
|
|
echo "# Újraindítás 1s" ; sleep 1
|
|
|
|
) |
|
|
zenity --progress \
|
|
--title="Az összes frissítés telepítve!" --width='300' \
|
|
--text="Újraindítás" \
|
|
--auto-close \
|
|
|
|
|
|
if [ $? = 1 ]; then
|
|
tput setaf 3
|
|
echo A script futása végzett. Kilépés!
|
|
tput sgr0
|
|
exit 0;
|
|
fi
|
|
|
|
sudo reboot
|