Add gnome to available choices for DE's

This commit is contained in:
natemaia 2018-08-19 20:32:21 -07:00
parent 3c37a64e15
commit 65c09a8469

View File

@ -15,7 +15,7 @@
# immutable variables {
readonly DIST="Archlabs" # Linux distributor
readonly VER="1.6.33" # Installer version
readonly VER="1.6.34" # Installer version
readonly LIVE="liveuser" # Live session user
readonly TRN="/usr/share/archlabs-installer" # Translation path
readonly MNT="/mnt/install" # Install mountpoint
@ -125,6 +125,7 @@ initialize_variables() {
declare -g INSTALL_WMS=""
declare -g WM_PACKAGES=""
declare -g EXTRA_PACKAGES=""
declare -g REMOVE_PKGS=""
declare -g CURRENT_MENU="main"
declare -g MENU_HIGHLIGHT=0
@ -645,6 +646,7 @@ choose_window_manager() {
"openbox" "A lightweight, powerful, and highly configurable stacking window manager" off \
"bspwm" "A tiling window manager that represents windows as the leaves of a binary tree" off \
"i3-gaps" "A fork of i3 window manager with more features including gaps" off \
"gnome" "A desktop environment that aims to be simple and easy to use" off \
"xfce4" "A lightweight and modular desktop environment based on GTK+ 2 and 3" off)"
INSTALL_WMS="${INSTALL_WMS:-openbox}"
@ -656,6 +658,7 @@ choose_window_manager() {
openbox) WM_PACKAGES="$WM_PACKAGES $wm obconf archlabs-ob-autostart archlabs-obkey archlabs-kickshaw" ;;
bspwm) WM_PACKAGES="$WM_PACKAGES $wm sxhkd lxappearance" ;;
i3-gaps) WM_PACKAGES="$WM_PACKAGES $wm i3status perl-anyevent-i3 lxappearance" ;;
gnome) WM_PACKAGES="$WM_PACKAGES $wm gnome-extra" ;;
xfce4) WM_PACKAGES="$WM_PACKAGES $wm xfce4-goodies xfce4-pulseaudio-plugin" ;;
esac
done
@ -674,13 +677,19 @@ choose_window_manager() {
if [[ $WM_NUM -eq 1 ]]; then
LOGIN_WM="$INSTALL_WMS"
[[ $INSTALL_WMS == 'gnome' ]] && REMOVE_PKGS="$(pacman -Qssq 'xfce4*')"
else
LOGIN_WM="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
--title " $_WMLogin " --menu "$_WMLoginBody" 0 0 0 $WM_LOGIN_CHOICES)"
[[ $LOGIN_WM == "" ]] && LOGIN_WM="$(awk '{print $1}' <<< "$INSTALL_WMS")"
fi
[[ $LOGIN_WM == 'i3-gaps' ]] && LOGIN_WM="i3"
case $LOGIN_WM in
i3-gaps) LOGIN_WM='i3' ;;
gnome) LOGIN_WM='gnome-session' ;;
openbox) LOGIN_WM='openbox-session' ;;
xfce4) LOGIN_WM='startxfce4' ;;
esac
return 0
}
@ -1819,8 +1828,11 @@ install_packages() {
[[ $LOGIN_TYPE == 'lightdm' ]] && pkgs="$pkgs lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
[[ $EXTRA_PACKAGES != "" ]] && pkgs="$pkgs $EXTRA_PACKAGES"
chroot_cmd "pacman -S $pkgs --needed --noconfirm" 2>/dev/null | dialog --cr-wrap --backtitle "$BT" \
--title " Install Packages " --progressbox "\nInstalling packages chosen during install setup.\n\n$pkgs" 30 90
local pkgcmd="pacman -S $pkgs --needed --noconfirm"
[[ $REMOVE_PKGS != "" ]] && pkgcmd="pacman -Rns $REMOVE_PKGS --noconfirm ; $pkgcmd"
chroot_cmd "$pkgcmd" 2>/dev/null | dialog --cr-wrap --backtitle "$BT" --title " Install Packages " \
--progressbox "\nInstalling packages chosen during install setup.\n\n$pkgs" 30 90
[[ $LOGIN_TYPE == 'lightdm' ]] && setup_lightdm
return 0