From 63ce0fc7963cd2c8c2fd1933faee68e887d3daa4 Mon Sep 17 00:00:00 2001 From: stojshic Date: Mon, 24 Jan 2022 19:50:20 +0100 Subject: [PATCH] Added option to choose DE --- 1-setup.sh | 2 +- 3-post-setup.sh | 44 ------------------------ 4-desktop.sh | 70 +++++++++++++++++++++++++++++++++++++++ archtitus.sh | 3 +- pkg-files/budgie.txt | 2 ++ pkg-files/cinnamon.txt | 3 ++ pkg-files/deepin.txt | 2 ++ pkg-files/gnome.txt | 4 +++ pkg-files/kde.txt | 32 ++++++++++++++++++ pkg-files/lxde.txt | 1 + pkg-files/mate.txt | 2 ++ pkg-files/openbox.txt | 40 ++++++++++++++++++++++ pkg-files/pacman-pkgs.txt | 35 +------------------- pkg-files/xfce.txt | 2 ++ startup.sh | 16 ++++++++- 15 files changed, 177 insertions(+), 81 deletions(-) create mode 100755 4-desktop.sh create mode 100644 pkg-files/budgie.txt create mode 100644 pkg-files/cinnamon.txt create mode 100644 pkg-files/deepin.txt create mode 100644 pkg-files/gnome.txt create mode 100644 pkg-files/kde.txt create mode 100644 pkg-files/lxde.txt create mode 100644 pkg-files/mate.txt create mode 100644 pkg-files/openbox.txt create mode 100644 pkg-files/xfce.txt diff --git a/1-setup.sh b/1-setup.sh index 3e56479..2b43143 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -26,7 +26,7 @@ echo -ne " ------------------------------------------------------------------------- " pacman -S --noconfirm pacman-contrib curl -pacman -S --noconfirm reflector rsync grub arch-install-scripts +pacman -S --noconfirm reflector rsync grub arch-install-scripts git cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak nc=$(grep -c ^processor /proc/cpuinfo) diff --git a/3-post-setup.sh b/3-post-setup.sh index 1fecd6c..bf533a8 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -41,47 +41,3 @@ echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub echo -e "Updating grub..." grub-mkconfig -o /boot/grub/grub.cfg echo -e "All set!" - -echo -ne " -------------------------------------------------------------------------- - Enabling Login Display Manager -------------------------------------------------------------------------- -" -systemctl enable sddm.service -echo -ne " -------------------------------------------------------------------------- - Setting up SDDM Theme -------------------------------------------------------------------------- -" -cat < /etc/sddm.conf -[Theme] -Current=Nordic -EOF - -echo -ne " -------------------------------------------------------------------------- - Enabling Essential Services -------------------------------------------------------------------------- -" -systemctl enable cups.service -ntpd -qg -systemctl enable ntpd.service -systemctl disable dhcpcd.service -systemctl stop dhcpcd.service -systemctl enable NetworkManager.service -systemctl enable bluetooth -echo -ne " -------------------------------------------------------------------------- - Cleaning -------------------------------------------------------------------------- -" -# Remove no password sudo rights -sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers -# Add sudo rights -sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers - -rm -r /root/ArchTitus -rm -r /home/$USERNAME/ArchTitus - -# Replace in the same state -cd $pwd diff --git a/4-desktop.sh b/4-desktop.sh new file mode 100755 index 0000000..ea541d7 --- /dev/null +++ b/4-desktop.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +echo -ne " +------------------------------------------------------------------------- + █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ + ██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝ + ███████║██████╔╝██║ ███████║ ██║ ██║ ██║ ██║ ██║███████╗ + ██╔══██║██╔══██╗██║ ██╔══██║ ██║ ██║ ██║ ██║ ██║╚════██║ + ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ +------------------------------------------------------------------------- + Automated Arch Linux Installer + SCRIPTHOME: ArchTitus +------------------------------------------------------------------------- + +------------------------------------------------------------------------- + Installing Desktop Enviroment +------------------------------------------------------------------------- +" + +source /root/ArchTitus/setup.conf + +cat /root/ArchTitus/pkg-files/${DESKTOP_ENV}.txt | while read line +do + echo "INSTALLING: ${line}" + sudo pacman -S --noconfirm --needed ${line} +done + +if [[ ${DESKTOP_ENV} == "kde" ]]; then + echo [Theme] >> /etc/sddm.conf + echo Current=Nordic >> /etc/sddm.conf + systemctl enable sddm.service + +elif [[ "${DESKTOP_ENV}" == "gnome" ]]; then + systemctl enable gdm.service + +elif [[ "${DESKTOP_ENV}" == "lxde" ]]; then + systemctl enable lxdm.service + +else + sudo pacman -S --noconfirm --needed lightdm lightdm-gtk-greeter + systemctl enable lightdm.service + +fi + +echo -ne " +------------------------------------------------------------------------- + Enabling Essential Services +------------------------------------------------------------------------- +" +systemctl enable cups.service +ntpd -qg +systemctl enable ntpd.service +systemctl disable dhcpcd.service +systemctl stop dhcpcd.service +systemctl enable NetworkManager.service +echo -ne " +------------------------------------------------------------------------- + Cleaning +------------------------------------------------------------------------- +" +# Remove no password sudo rights +sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers +# Add sudo rights +sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers + +rm -r /root/ArchTitus +rm -r /home/$USERNAME/ArchTitus + +# Replace in the same state +cd $pwd diff --git a/archtitus.sh b/archtitus.sh index e18bdd6..e718387 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -21,6 +21,7 @@ echo -ne " ( arch-chroot /mnt /root/ArchTitus/1-setup.sh )|& tee 1-setup.log ( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchTitus/2-user.sh )|& tee 2-user.log ( arch-chroot /mnt /root/ArchTitus/3-post-setup.sh )|& tee 3-post-setup.log + ( arch-chroot /mnt /root/ArchTitus/4-desktop.sh )|& tee 4-desktop.log echo -ne " ------------------------------------------------------------------------- @@ -34,4 +35,4 @@ echo -ne " Automated Arch Linux Installer ------------------------------------------------------------------------- Done - Please Eject Install Media and Reboot -" \ No newline at end of file +" diff --git a/pkg-files/budgie.txt b/pkg-files/budgie.txt new file mode 100644 index 0000000..0ebe7d5 --- /dev/null +++ b/pkg-files/budgie.txt @@ -0,0 +1,2 @@ +budgie-desktop +gnome diff --git a/pkg-files/cinnamon.txt b/pkg-files/cinnamon.txt new file mode 100644 index 0000000..f0c8871 --- /dev/null +++ b/pkg-files/cinnamon.txt @@ -0,0 +1,3 @@ +cinnamon +metacity +gnome-shell diff --git a/pkg-files/deepin.txt b/pkg-files/deepin.txt new file mode 100644 index 0000000..7aa4d6a --- /dev/null +++ b/pkg-files/deepin.txt @@ -0,0 +1,2 @@ +deepin +deepin-extra diff --git a/pkg-files/gnome.txt b/pkg-files/gnome.txt new file mode 100644 index 0000000..d218836 --- /dev/null +++ b/pkg-files/gnome.txt @@ -0,0 +1,4 @@ +gnome +gnome-tweaks +dconf-editor +gnome-extras diff --git a/pkg-files/kde.txt b/pkg-files/kde.txt new file mode 100644 index 0000000..b0c40f0 --- /dev/null +++ b/pkg-files/kde.txt @@ -0,0 +1,32 @@ +ark +audiocd-kio +bluedevil +breeze +breeze-gtk +discover +dolphin +extra-cmake-modules +filelight +gwenview +kate +kde-gtk-config +kcodecs +kcoreaddons +kdeplasma-addons +kinfocenter +konsole +kscreen +kvantum-qt5 +layer-shell-qt +milou +okular +oxygen +plasma-desktop +plasma-nm +powerdevil +print-manager +sddm-kcm +spectacle +systemsettings +xdg-desktop-portal-kde +zeroconf-ioslave diff --git a/pkg-files/lxde.txt b/pkg-files/lxde.txt new file mode 100644 index 0000000..49be587 --- /dev/null +++ b/pkg-files/lxde.txt @@ -0,0 +1 @@ +lxde diff --git a/pkg-files/mate.txt b/pkg-files/mate.txt new file mode 100644 index 0000000..178264c --- /dev/null +++ b/pkg-files/mate.txt @@ -0,0 +1,2 @@ +mate +mate-extra diff --git a/pkg-files/openbox.txt b/pkg-files/openbox.txt new file mode 100644 index 0000000..a34a9a5 --- /dev/null +++ b/pkg-files/openbox.txt @@ -0,0 +1,40 @@ +openbox +lightdm +lightdm-gtk-greeter +alsa-utils +pulseaudio +pulseaudio-alsa +wireless_tools +zsh +dunst +tint2 +rofi +feh +lxappearance +qt5ct +lxsession +gsimplecal +xautolock +xclip +scrot +thunar +thunar-archive-plugin +thunar-volman +thunar-media-tags-plugin +tumbler +jq +w3m +geany +nano +viewnior +viewnior +pavucontrol +parcellite +neofetch +htop +picom +gtk2-perl +xfce4-power-manager +imagemagick +playerctl +xsettingsd diff --git a/pkg-files/pacman-pkgs.txt b/pkg-files/pacman-pkgs.txt index 42bf817..e58a5c4 100644 --- a/pkg-files/pacman-pkgs.txt +++ b/pkg-files/pacman-pkgs.txt @@ -6,11 +6,8 @@ xorg-drivers xorg-xkill xorg-xinit xterm -plasma-desktop alsa-plugins alsa-utils -ark -audiocd-kio autoconf automake base @@ -18,12 +15,9 @@ bash-completion bind binutils bison -bluedevil bluez bluez-libs bluez-utils -breeze -breeze-gtk bridge-utils btrfs-progs celluloid @@ -32,15 +26,11 @@ code cronie cups dialog -discover -dolphin dosfstools dtc efibootmgr egl-wayland exfat-utils -extra-cmake-modules -filelight flex fuse2 fuse3 @@ -56,23 +46,11 @@ grub-customizer gst-libav gst-plugins-good gst-plugins-ugly -gwenview haveged htop iptables-nft jdk-openjdk -kate -kcodecs -kcoreaddons -kde-plasma-addons -kinfocenter -kscreen -kvantum-qt5 -kde-gtk-config kitty -konsole -kscreen -layer-shell-qt libdvdcss libnewt libtool @@ -84,26 +62,20 @@ lutris lzop m4 make -milou nano neofetch networkmanager ntfs-3g ntp -okular openbsd-netcat openssh os-prober -oxygen p7zip pacman-contrib patch picom pkgconf -plasma-nm -powerdevil powerline-fonts -print-manager pulseaudio pulseaudio-alsa pulseaudio-bluetooth @@ -114,14 +86,11 @@ python-pip qemu rsync sddm -sddm-kcm snapper -spectacle steam sudo swtpm synergy -systemsettings terminus-font traceroute ufw @@ -136,10 +105,8 @@ which wine-gecko wine-mono winetricks -xdg-desktop-portal-kde xdg-user-dirs -zeroconf-ioslave zip zsh zsh-syntax-highlighting -zsh-autosuggestions \ No newline at end of file +zsh-autosuggestions diff --git a/pkg-files/xfce.txt b/pkg-files/xfce.txt new file mode 100644 index 0000000..87200da --- /dev/null +++ b/pkg-files/xfce.txt @@ -0,0 +1,2 @@ +xfce4 +xfce-goodies diff --git a/startup.sh b/startup.sh index d0c4c23..612bbb4 100755 --- a/startup.sh +++ b/startup.sh @@ -271,12 +271,23 @@ set_option NAME_OF_MACHINE $nameofmachine } aurhelper () { - echo -ne "Please enter your desired AUR helper:" + # Let the user choose AUR helper from predefined list + echo -ne "Please enter your desired AUR helper:\n" options=(paru yay picaur aura trizen pacaur none) select_option $? 4 "${options[@]}" aur_helper=${options[$?]} set_option AUR_HELPER $aur_helper } + +desktopenv () { + # Let the user choose Desktop Enviroment from predefined list + echo -ne "Please select your desired Desktop Enviroment:\n" + options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox) + select_option $? 4 "${options[@]}" + desktop_env=${options[$?]} + set_option DESKTOP_ENV $desktop_env +} + # More features in future # language (){} @@ -286,6 +297,9 @@ logo userinfo clear logo +desktopenv +clear +logo aurhelper clear logo