Add gnome to available choices for DE's
This commit is contained in:
parent
3c37a64e15
commit
65c09a8469
@ -15,7 +15,7 @@
|
|||||||
# immutable variables {
|
# immutable variables {
|
||||||
|
|
||||||
readonly DIST="Archlabs" # Linux distributor
|
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 LIVE="liveuser" # Live session user
|
||||||
readonly TRN="/usr/share/archlabs-installer" # Translation path
|
readonly TRN="/usr/share/archlabs-installer" # Translation path
|
||||||
readonly MNT="/mnt/install" # Install mountpoint
|
readonly MNT="/mnt/install" # Install mountpoint
|
||||||
@ -125,6 +125,7 @@ initialize_variables() {
|
|||||||
declare -g INSTALL_WMS=""
|
declare -g INSTALL_WMS=""
|
||||||
declare -g WM_PACKAGES=""
|
declare -g WM_PACKAGES=""
|
||||||
declare -g EXTRA_PACKAGES=""
|
declare -g EXTRA_PACKAGES=""
|
||||||
|
declare -g REMOVE_PKGS=""
|
||||||
|
|
||||||
declare -g CURRENT_MENU="main"
|
declare -g CURRENT_MENU="main"
|
||||||
declare -g MENU_HIGHLIGHT=0
|
declare -g MENU_HIGHLIGHT=0
|
||||||
@ -645,6 +646,7 @@ choose_window_manager() {
|
|||||||
"openbox" "A lightweight, powerful, and highly configurable stacking window manager" off \
|
"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 \
|
"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 \
|
"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)"
|
"xfce4" "A lightweight and modular desktop environment based on GTK+ 2 and 3" off)"
|
||||||
|
|
||||||
INSTALL_WMS="${INSTALL_WMS:-openbox}"
|
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" ;;
|
openbox) WM_PACKAGES="$WM_PACKAGES $wm obconf archlabs-ob-autostart archlabs-obkey archlabs-kickshaw" ;;
|
||||||
bspwm) WM_PACKAGES="$WM_PACKAGES $wm sxhkd lxappearance" ;;
|
bspwm) WM_PACKAGES="$WM_PACKAGES $wm sxhkd lxappearance" ;;
|
||||||
i3-gaps) WM_PACKAGES="$WM_PACKAGES $wm i3status perl-anyevent-i3 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" ;;
|
xfce4) WM_PACKAGES="$WM_PACKAGES $wm xfce4-goodies xfce4-pulseaudio-plugin" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -674,13 +677,19 @@ choose_window_manager() {
|
|||||||
|
|
||||||
if [[ $WM_NUM -eq 1 ]]; then
|
if [[ $WM_NUM -eq 1 ]]; then
|
||||||
LOGIN_WM="$INSTALL_WMS"
|
LOGIN_WM="$INSTALL_WMS"
|
||||||
|
[[ $INSTALL_WMS == 'gnome' ]] && REMOVE_PKGS="$(pacman -Qssq 'xfce4*')"
|
||||||
else
|
else
|
||||||
LOGIN_WM="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
|
LOGIN_WM="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
|
||||||
--title " $_WMLogin " --menu "$_WMLoginBody" 0 0 0 $WM_LOGIN_CHOICES)"
|
--title " $_WMLogin " --menu "$_WMLoginBody" 0 0 0 $WM_LOGIN_CHOICES)"
|
||||||
[[ $LOGIN_WM == "" ]] && LOGIN_WM="$(awk '{print $1}' <<< "$INSTALL_WMS")"
|
[[ $LOGIN_WM == "" ]] && LOGIN_WM="$(awk '{print $1}' <<< "$INSTALL_WMS")"
|
||||||
fi
|
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
|
return 0
|
||||||
}
|
}
|
||||||
@ -1819,8 +1828,11 @@ install_packages() {
|
|||||||
[[ $LOGIN_TYPE == 'lightdm' ]] && pkgs="$pkgs lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
|
[[ $LOGIN_TYPE == 'lightdm' ]] && pkgs="$pkgs lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
|
||||||
[[ $EXTRA_PACKAGES != "" ]] && pkgs="$pkgs $EXTRA_PACKAGES"
|
[[ $EXTRA_PACKAGES != "" ]] && pkgs="$pkgs $EXTRA_PACKAGES"
|
||||||
|
|
||||||
chroot_cmd "pacman -S $pkgs --needed --noconfirm" 2>/dev/null | dialog --cr-wrap --backtitle "$BT" \
|
local pkgcmd="pacman -S $pkgs --needed --noconfirm"
|
||||||
--title " Install Packages " --progressbox "\nInstalling packages chosen during install setup.\n\n$pkgs" 30 90
|
[[ $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
|
[[ $LOGIN_TYPE == 'lightdm' ]] && setup_lightdm
|
||||||
return 0
|
return 0
|
||||||
@ -1894,7 +1906,7 @@ select_extra_packages() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_lightdm() {
|
setup_lightdm() {
|
||||||
chroot_cmd 'systemctl enable lightdm.service && systemctl set-default graphical.target' >/dev/null 2>&1
|
chroot_cmd 'systemctl enable lightdm.service && systemctl set-default graphical.target' >/dev/null 2>&1
|
||||||
|
|
||||||
local cfg="$MNT/etc/lightdm/lightdm-gtk-greeter.conf"
|
local cfg="$MNT/etc/lightdm/lightdm-gtk-greeter.conf"
|
||||||
@ -1911,7 +1923,7 @@ select_extra_packages() {
|
|||||||
sed -i '/#%PAM-1.0/ a auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' $MNT/etc/pam.d/lightdm
|
sed -i '/#%PAM-1.0/ a auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' $MNT/etc/pam.d/lightdm
|
||||||
sed -i "/#autologin-session=/ c autologin-session=${LOGIN_WM}" $MNT/etc/lightdm/lightdm.conf
|
sed -i "/#autologin-session=/ c autologin-session=${LOGIN_WM}" $MNT/etc/lightdm/lightdm.conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_system() {
|
update_system() {
|
||||||
local pkgcmd
|
local pkgcmd
|
||||||
|
Reference in New Issue
Block a user