#!/bin/bash . ./lib options=() #options+=("octopi" "(AUR) qt pacman gui" off) #options+=("appset-qt" "(AUR) qt pacman gui" off) #options+=("pamac-aur" "(AUR) gtk pacman gui" off) options+=("gparted" "Partitions manager" off) options+=("bleachbit" "profile cleaner" off) options+=("keepass" "Password Manager" off) options+=("keepassx" "Password Manager" off) options+=("keepassx-git" "(AUR) Password Manager" off) options+=("virtualbox" "" off) options+=("virtualbox-host-dkms" "recommended for virtualbox" off) #options+=("virtualbox-host-modules" "" on) options+=("wine" "MS Windows App Support" off) options+=("wine_gecko" "MS Windows App Support" off) options+=("wine-mono" "MS Windows App Support" off) options+=("zenity" "recommended for wine" off) options+=("winetricks" "recommended for wine" off) options+=("k4dirstat" "(AUR)" off) options+=("conky" "" off) sel=$(whiptail --backtitle "$apptitle" --title "System applications :" --checklist "Choose what you want" --cancel-button "Back" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) if [ ! "$?" = "0" ]; then exit 1 fi for itm in $sel; do case $itm in '"octopi"' | \ '"appset-qt"' | \ '"pamac-aur"' | \ '"keepassx-git"' | \ '"k4dirstat"') aurpkg="$aurpkg $(echo $itm | sed 's/"//g')";; '"wine"' | \ '"wine_gecko"') multilib="true" pkg="$pkg $(echo $itm | sed 's/"//g')" ;; '"virtualbox-host-modules"') pkg="$pkg virtualbox-host-dkms" pkg="$pkg virtualbox-host-modules" ;; *) pkg="$pkg $(echo $itm | sed 's/"//g')";; esac done if [ "$multilib" = "true" ]; then if ( confirm "To install wine or wine_gecko, multilib repo is requires.\nFor this, the script edit the [mulilib] part in /etc/pacman.conf and run pacman -Syu\n\nEnable multilib repo ?" ) then sed -i '/\[multilib\]/s/^#//g' /etc/pacman.conf sed -i '/\[multilib\]/{n;s/^#//g}' /etc/pacman.conf pacman -Syu else exit 1 fi fi instpkg "$pkg" "$aurpkg" for itm in $sel; do case $itm in '"virtualbox-host-dkms"') if ( confirm "virtualbox-host-dkms require to rebuild initcpio.\n\nRun mkinitcpio -o linux ?" ) then mkinitcpio -p linux fi svcenable dkms svcstart dkms dkms autoinstall ;; '"virtualbox-host-modules"') dkms autoinstall ;; esac done exit 0