Fix xinit session issue

This commit is contained in:
natemaia
2018-08-28 23:30:40 -07:00
parent b3657b0c9d
commit a48143063a
4 changed files with 62 additions and 37 deletions

View File

@ -12,7 +12,7 @@
# immutable variables {
readonly DIST="ArchLabs" # Linux distributor
readonly VER="1.6.62" # Installer version
readonly VER="1.6.64" # Installer version
readonly LIVE="liveuser" # Live session user
readonly MNT="/mnt/install" # Install mountpoint
readonly ERR="/tmp/errlog" # Built-in error log
@ -26,10 +26,22 @@ readonly LOCALES="$(awk '/\.UTF-8/ {gsub(/# .*|#/, ""); if($1) print $1 " -"}' /
readonly CONSOLE_MAPS="$(awk '{gsub(/\.map\.gz|.*\//, ""); print $1 " -"}' <<< "$KBD")"
readonly SYS_MEM=$(grep 'MemTotal' /proc/meminfo | awk '{print int($2 / 1024)}')
readonly SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | awk '/disk/ && !'"/$IGNORE_DEV/"' {print "/dev/" $1 " " $2}')"
readonly IGNORE_DEV="$(lsblk -lno NAME,MOUNTPOINT | awk '/\/run\/archiso\/bootmnt/ {sub(/[1-9]/, ""); print $1}')"
if [[ $IGNORE_DEV ]]; then
readonly SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | awk '/disk/ && !'"/$IGNORE_DEV/"' {print "/dev/" $1 " " $2}')"
else
readonly SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE | awk '/disk/ {print "/dev/" $1 " " $2}')"
fi
readonly DEV_COUNT="$(wc -l <<< "$SYS_DEVS")"
if [[ $(grep 'GenuineIntel' /proc/cpuinfo) ]]; then
readonly UCODE="/intel-ucode.img"
elif [[ $(grep 'AuthenticAMD' /proc/cpuinfo) ]]; then
readonly UCODE="/amd-ucode.img"
fi
# create associative array for SUBZONES[zone], value is: 'sub-zone country_code'
declare -Ag SUBZONES
for zone in America Australia Asia Atlantic Africa Europe Indian Pacific Arctic Antarctica; do
@ -295,6 +307,16 @@ window_manager() {
WM_PACKAGES="$WM_PACKAGES archlabs-oblogout archlabs-screenlock"
fi
# choose which to login
if [[ $WM_NUM -eq 1 ]]; then
LOGIN_WM="$INSTALL_WMS"
else
LOGIN_WM="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
--title " $_WMLogin " --menu "$_WMLoginBody" 0 0 0 $LOGIN_CHOICES)"
[[ $LOGIN_WM == "" ]] && LOGIN_WM="$(awk '{print $1}' <<< "$INSTALL_WMS")"
fi
# chose login type
if yesno "$_WMLogin" "$_LoginTypeBody\n" "xinit" "lightdm"; then
LOGIN_TYPE='xinit'
FILES[11]="/home/$NEWUSER/.xinitrc"
@ -306,16 +328,9 @@ window_manager() {
EXTRA_PACKAGES="$WM_PACKAGES"
# autologin
yesno "$_WMLogin" "$_AutoLoginBody\n" && AUTOLOGIN=true || AUTOLOGIN=false
if [[ $WM_NUM -eq 1 ]]; then
LOGIN_WM="$INSTALL_WMS"
else
LOGIN_WM="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
--title " $_WMLogin " --menu "$_WMLoginBody" 0 0 0 $LOGIN_CHOICES)"
[[ $LOGIN_WM == "" ]] && LOGIN_WM="$(awk '{print $1}' <<< "$INSTALL_WMS")"
fi
case $LOGIN_WM in
i3-gaps) LOGIN_WM='i3' ;;
gnome) LOGIN_WM='gnome-session' ;;