#!/usr/bin/bash # Hello! If you are reading that and you're thinking that some important packages are missing in the scripts, than please considere add an Issue at the github page to tell us about it: # https://niklas20114552.github.io function iaur() { if [[ $aurh == chaotic ]]; then pacman --noconfirm --needed -S $1 else if ! pacman -Qs $1 > /dev/null ; then git clone https://aur.archlinux.org/$1.git /tmp/$1 (cd /tmp/$1 && /var/setup/sumkpkg -si --noconfirm --skippgpcheck) rm -rf /tmp/$1 fi fi } function lang() { source /var/setup/lang.conf $slan dialog --title "Language" --yesno "$chlan1 \n\n--> $ask \n\n$chlan2" 0 0 if [[ $? == 1 ]]; then o2=$(dialog --no-cancel --title "Language" --menu "Please choose your language." 20 40 5 "de_DE.UTF-8" "Deutsch" "en_US.UTF-8" "English (US)" "fr_FR.UTF-8" "Français" "nl_NL.UTF-8" "Nederlands" "it_IT.UTF-8" "Italiano" "es_ES.UTF-8" "Español" 3>&1 1>&2 2>&3 3>&-) case $o2 in de_DE.UTF-8) slan=de && ask=Deutsch ;; en_US.UTF-8) slan=en && ask=English ;; fr_FR.UTF-8) slan=fr && ask=Français ;; nl_NL.UTF-8) slan=nl && ask=Nederlands ;; it_IT.UTF-8) slan=it && ask=Italiano ;; es_ES.UTF-8) slan=es && ask=Español ;; esac lang fi } if [[ ! -f /usr/bin/dialog ]]; then echo Please install: dialog exit fi if [[ ! -f /usr/bin/git ]]; then echo Please install: git exit fi lan="$(cat /etc/locale.gen)" source /var/setup/setup.conf case "$lan" in "de_DE.UTF-8 UTF-8") slan=de && ask=Deutsch ;; "en_US.UTF-8 UTF-8") slan=en && ask=English ;; "fr_FR.UTF-8 UTF-8") slan=fr && ask=Français ;; "nl_NL.UTF-8 UTF-8") slan=nl && ask=Nederlands ;; "it_IT.UTF-8 UTF-8") slan=it && ask=Italiano ;; "es_ES.UTF-8 UTF-8") slan=es && ask=Español ;; esac if [[ ! -f /var/setup/lang.conf ]]; then curl -o /var/setup/lang.conf https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/lang.conf fi lang if [[ ! $(whoami) == root ]]; then dialog --title "Installer" --msgbox "$err1" 5 45 exit fi dialog --title "Installer" --extra-button --extra-label $but1 --msgbox "$lan1" 8 45 if [[ $? == 3 ]]; then exit fi o1=$(dialog --no-items --title "$tit1" --menu "$lan2" 0 0 0 KDE-Plasma GNOME Xfce4 Cinnamon Deepin Trinity MATE LXQt LXDE 3>&1 1>&2 2>&3 3>&-) if [[ $o1 == "" ]]; then exit elif [[ $o1 == "KDE-Plasma" ]]; then de=kde elif [[ $o1 == "GNOME" ]]; then de=gnome elif [[ $o1 == "Xfce4" ]]; then de=xfce elif [[ $o1 == "Cinnamon" ]]; then de=cinnamon elif [[ $o1 == "Deepin" ]]; then de=deepin elif [[ $o1 == "Trinity" ]]; then de=tde elif [[ $o1 == "MATE" ]]; then de=mate elif [[ $o1 == "LXQt" ]]; then de=lxqt elif [[ $o1 == "LXDE" ]]; then de=lxde fi if [[ $aurh == none ]]; then dialog --cr-wrap --title "AUR-Helper" --extra-button --extra-label "Yay" --help-button --help-label "$but2" --yes-label "Paru" --no-label "Chaotic-AUR" --yesno "$lan3" 0 0 if [[ $? == 0 ]]; then aur=paru-bin aurf=paru elif [[ $? == 3 ]]; then aur=yay-bin aurf=yay elif [[ $? == 2 ]]; then aurf=none elif [[ $? == 1 ]]; then aur=chaotic aurf=chaotic fi fi dialog --title "Installer" --msgbox "$lan4" 5 45 if [ "$aur" == "paru-bin" ] || [ "$aur" == "yay-bin" ]; then iaur $aur sed -i "/^aurh=/c\aurh=$aurf" /var/setup/setup.conf source /var/setup/setup.conf elif [[ $aur == chaotic ]]; then pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com pacman-key --lsign-key FBA220DFC880C036 pacman --needed --noconfirm -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' echo "[chaotic-aur] Include = /etc/pacman.d/chaotic-mirrorlist [multilib] Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf pacman --noconfirm --needed -Syy sed -i "/^aurh=/c\aurh=$aurf" /var/setup/setup.conf source /var/setup/setup.conf fi firewall-cmd -q --add-port=1025-65535/tcp --permanent firewall-cmd -q --add-port=1025-65535/udp --permanent firewall-cmd -q --reload localectl --no-convert set-x11-keymap $layout case $slan in de) libreoffice=libreoffice-still-de ;; en) libreoffice=libreoffice-still ;; fr) libreoffice=libreoffice-still-fr ;; it) libreoffice=libreoffice-still-it ;; nl) libreoffice=libreoffice-still-nl ;; es) libreoffice=libreoffice-still-es ;; esac if [[ $de == kde ]]; then iaur firefox-appmenu pacman --ignore konqueror --noconfirm --needed -Sy xorg sddm plasma kde-applications vlc papirus-icon-theme materia-kde archlinux-wallpaper $libreoffice systemctl enable sddm elif [[ $de == gnome ]]; then iaur bdf-unifont iaur extension-manager pacman --ignore epiphany --noconfirm --needed -Syu gdm gnome gnome-extra firefox gnome-tweaks arc-gtk-theme arc-icon-theme vlc dina-font tamsyn-font ttf-bitstream-vera ttf-croscore ttf-dejavu ttf-droid gnu-free-fonts ttf-ibm-plex ttf-liberation ttf-linux-libertine noto-fonts ttf-roboto tex-gyre-fonts ttf-ubuntu-font-family ttf-anonymous-pro ttf-cascadia-code ttf-fantasque-sans-mono ttf-fira-mono ttf-hack ttf-fira-code ttf-inconsolata ttf-jetbrains-mono ttf-monofur adobe-source-code-pro-fonts cantarell-fonts inter-font ttf-opensans gentium-plus-font ttf-junicode adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts noto-fonts-cjk noto-fonts-emoji archlinux-wallpaper $libreoffice systemctl enable gdm elif [[ $de == cinnamon ]]; then iaur lightdm-settings pacman --needed --noconfirm -Syu xorg lightdm lightdm-slick-greeter gnome-software cinnamon firefox arc-gtk-theme arc-icon-theme vlc xed xreader metacity archlinux-wallpaper celluloid shotwell gnome-terminal cinnamon-translations nemo-fileroller $libreoffice sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf systemctl enable lightdm elif [[ $de == xfce ]]; then pacman --noconfirm --needed -Syu xorg lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings xfce4 xfce4-goodies firefox arc-gtk-theme arc-icon-theme vlc archlinux-wallpaper systemctl enable lightdm elif [[ $de == deepin ]]; then pacman --needed --noconfirm -Syu xorg lightdm deepin deepin-extra firefox archlinux-wallpaper sed -i '/^greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf sed -i '/^#greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf systemctl enable lightdm elif [[ $de == mate ]]; then pacman --noconfirm --needed -Syu xorg lightdm mate mate-extra firefox archlinux-wallpaper lightdm-gtk-greeter lightdm-gtk-greeter-settings $libreoffice systemctl enable lightdm elif [[ $de == lxqt ]]; then iaur lightdm-settings pacman --noconfirm --needed -Syu xorg lxqt xdg-utils ttf-freefont libpulse libstatgrab libsysstat lm_sensors network-manager-applet oxygen-icons pavucontrol-qt lightdm lightdm-slick-greeter $libreoffice sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf systemctl enable lightdm elif [[ $de == tde ]]; then if ! grep -q "trinity" "/etc/pacman.conf"; then pacman-key --recv-keys 8685AD8B pacman-key --lsign-key 8685AD8B echo "[trinity] Server = https://mirror.ppa.trinitydesktop.org/trinity/archlinux/x86_64" >> /etc/pacman.conf fi pacman --needed --noconfirm -Syyu tde-meta firefox vlc archlinux-wallpaper $libreoffice systemctl enable tdm elif [[ $de == lxde ]]; then iaur lightdm-settings iaur python2-bin iaur gamin pacman --needed --noconfirm -Syu lxde lightdm lightdm-slick-greeter vlc firefox celluloid xed arc-gtk-theme arc-icon-theme $libreoffice sed -i '/^greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf sed -i '/^#greeter-session=/c\greeter-session=lightdm-slick-greeter' /etc/lightdm/lightdm.conf systemctl enable lightdm fi dialog --title "Installer" --ok-label "$but3" --pause "$lan5" 8 50 10 reboot