Fix: terminal not being installed when one was not selected.
This commit is contained in:
parent
168f7ec8f3
commit
68f7194c8f
@ -5,7 +5,7 @@
|
|||||||
# Some ideas and code reworked from other resources
|
# Some ideas and code reworked from other resources
|
||||||
# AIF, Cnichi, Calamares, Arch Wiki.. Credit where credit is due
|
# AIF, Cnichi, Calamares, Arch Wiki.. Credit where credit is due
|
||||||
|
|
||||||
VER=2.0.78
|
VER=2.0.79
|
||||||
|
|
||||||
# bulk default values {
|
# bulk default values {
|
||||||
|
|
||||||
@ -23,12 +23,12 @@ RUN=/run/archiso/bootmnt/arch/boot # path for live system /boot
|
|||||||
VM="$(dmesg | grep -i hypervisor)" # system running in a virtual machine
|
VM="$(dmesg | grep -i hypervisor)" # system running in a virtual machine
|
||||||
export DIALOGOPTS="--cr-wrap" # see `man dialog`
|
export DIALOGOPTS="--cr-wrap" # see `man dialog`
|
||||||
|
|
||||||
BASE_PKGS="base-devel xorg xorg-drivers sudo git gvfs gtk3 libmad libmatroska tumbler "
|
BASE_PKGS="base base-devel xorg xorg-drivers sudo git gvfs gtk3 libmad libmatroska tumbler "
|
||||||
BASE_PKGS+="playerctl pulseaudio pulseaudio-alsa pavucontrol pamixer scrot xdg-user-dirs "
|
BASE_PKGS+="playerctl pulseaudio pulseaudio-alsa pavucontrol pamixer scrot xdg-user-dirs "
|
||||||
BASE_PKGS+="ffmpeg gstreamer gst-libav gst-plugins-base gst-plugins-good bash-completion "
|
BASE_PKGS+="ffmpeg gstreamer gst-libav gst-plugins-base gst-plugins-good bash-completion "
|
||||||
|
|
||||||
AL_BASE_PKGS="archlabs-icons archlabs-fonts archlabs-themes archlabs-baph "
|
AL_BASE_PKGS="archlabs-keyring archlabs-icons archlabs-fonts archlabs-themes "
|
||||||
AL_BASE_PKGS+="archlabs-wallpapers archlabs-scripts archlabs-skel-base"
|
AL_BASE_PKGS+="archlabs-baph archlabs-wallpapers archlabs-scripts archlabs-skel-base"
|
||||||
|
|
||||||
WM_BASE_PKGS="arandr nitrogen polkit-gnome network-manager-applet "
|
WM_BASE_PKGS="arandr nitrogen polkit-gnome network-manager-applet "
|
||||||
WM_BASE_PKGS+="volumeicon xclip exo laptop-detect xdotool compton wmctrl feh "
|
WM_BASE_PKGS+="volumeicon xclip exo laptop-detect xdotool compton wmctrl feh "
|
||||||
@ -60,7 +60,7 @@ declare -A WM_SESSIONS=(
|
|||||||
declare -A WM_EXT=(
|
declare -A WM_EXT=(
|
||||||
[dwm]='' [gnome]='' [cinnamon]='gnome-terminal' [plasma]='kdebase-meta'
|
[dwm]='' [gnome]='' [cinnamon]='gnome-terminal' [plasma]='kdebase-meta'
|
||||||
[awesome]='archlabs-skel-awesome' [bspwm]='archlabs-skel-bspwm' [fluxbox]='archlabs-skel-fluxbox'
|
[awesome]='archlabs-skel-awesome' [bspwm]='archlabs-skel-bspwm' [fluxbox]='archlabs-skel-fluxbox'
|
||||||
[i3-gaps]='archlabs-skel-i3-gaps' [openbox]='archlabs-skel-openbox' [xfce4]='archlabs-skel-xfce4 xfce4-goodies'
|
[i3-gaps]='archlabs-skel-i3-gaps' [openbox]='archlabs-skel-openbox archlabs-skel-xfce4' [xfce4]='archlabs-skel-xfce4 xfce4-goodies'
|
||||||
) # }
|
) # }
|
||||||
|
|
||||||
# files offered for editing after install is complete {
|
# files offered for editing after install is complete {
|
||||||
@ -1359,11 +1359,12 @@ install_user()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $MYSHELL != 'bash' ]] && rm -rf "$MNT/home/$NEWUSER/.bash"*
|
[[ $MYSHELL != 'bash' ]] && rm -rf "$MNT/home/$NEWUSER/.bash"*
|
||||||
|
[[ $MYSHELL != 'zsh' ]] && rm -rf "$MNT/home/$NEWUSER/.z"*
|
||||||
|
|
||||||
# remove some commands from ~/.xprofile when using KDE or Gnome as the login session
|
# remove some commands from ~/.xprofile when using KDE or Gnome as the login session
|
||||||
if [[ $LOGIN_WM =~ (startkde|gnome-session) || ($LOGIN_TYPE != 'xinit' && $WM_PKGS =~ (plasma|gnome)) ]]; then
|
if [[ $LOGIN_WM =~ (startkde|gnome-session) || ($LOGIN_TYPE != 'xinit' && $WM_PKGS =~ (plasma|gnome)) ]]; then
|
||||||
sed -i '/super/d; /nitrogen/d; /compton/d' "$MNT/home/$NEWUSER/.xprofile" "$MNT/root/.xprofile"
|
sed -i '/super/d; /nitrogen/d; /compton/d' "$MNT/home/$NEWUSER/.xprofile" "$MNT/root/.xprofile"
|
||||||
elif [[ $INSTALL_WMS == 'dwm' ]]; then # and dwm
|
elif [[ $LOGIN_WM == 'dwm' ]]; then # and dwm
|
||||||
sed -i '/super/d; /compton/d' "$MNT/home/$NEWUSER/.xprofile" "$MNT/root/.xprofile"
|
sed -i '/super/d; /compton/d' "$MNT/home/$NEWUSER/.xprofile" "$MNT/root/.xprofile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1379,6 +1380,17 @@ install_login()
|
|||||||
echo "Setting up $LOGIN_TYPE"
|
echo "Setting up $LOGIN_TYPE"
|
||||||
case $LOGIN_TYPE in
|
case $LOGIN_TYPE in
|
||||||
ly|sddm|gdm|lightdm)
|
ly|sddm|gdm|lightdm)
|
||||||
|
if [[ $LOGIN_WM == *dwm* ]]; then # dwm doesn't include an xsession file for display managers
|
||||||
|
mkdir -p $MNT/usr/share/xsessions
|
||||||
|
cat >$MNT/usr/share/xsessions/dwm.desktop <<- EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=Dwm
|
||||||
|
Comment=Dynamic Window Manager
|
||||||
|
Exec=dwm
|
||||||
|
Type=XSession
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
rm -rf "$serv" "$MNT/home/$NEWUSER/.xinitrc"
|
rm -rf "$serv" "$MNT/home/$NEWUSER/.xinitrc"
|
||||||
chrun "systemctl enable $LOGIN_TYPE.service" 2>$ERR
|
chrun "systemctl enable $LOGIN_TYPE.service" 2>$ERR
|
||||||
errshow 1 "systemctl enable $LOGIN_TYPE.service"
|
errshow 1 "systemctl enable $LOGIN_TYPE.service"
|
||||||
@ -1417,12 +1429,12 @@ install_packages()
|
|||||||
|
|
||||||
[[ $KERNEL != 'linux' ]] && rmpkg+='linux '
|
[[ $KERNEL != 'linux' ]] && rmpkg+='linux '
|
||||||
|
|
||||||
if [[ $INSTALL_WMS == 'dwm' ]]; then
|
if [[ $INSTALL_WMS == 'dwm' ]]; then # dwm only needs a very limited package set
|
||||||
inpkg+="nitrogen polkit-gnome xclip gnome-keyring dunst feh "
|
inpkg+="nitrogen polkit-gnome gnome-keyring dunst "
|
||||||
else
|
else
|
||||||
[[ $INSTALL_WMS =~ ^(plasma|gnome|cinnamon)$ ]] || inpkg+="archlabs-ksuperkey "
|
[[ $INSTALL_WMS =~ (plasma|gnome|cinnamon) ]] || inpkg+="archlabs-ksuperkey "
|
||||||
[[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|fluxbox) ]] && inpkg+="$WM_BASE_PKGS "
|
[[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|fluxbox) ]] && inpkg+="$WM_BASE_PKGS "
|
||||||
[[ $inpkg =~ (term|gnome|xfce|plasma|cinnamon|rxvt|tilda|tilix|sakura) ]] || inpkg+="xterm "
|
[[ $inpkg =~ (term|plasma|rxvt|tilda|tilix|sakura) || $INSTALL_WMS =~ (gnome|plasma|xfce4) ]] || inpkg+="xterm "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# update and install crucial packages first to avoid issues
|
# update and install crucial packages first to avoid issues
|
||||||
@ -2142,8 +2154,8 @@ live()
|
|||||||
die 1
|
die 1
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
pacman -Syyu --noconfirm || die 1
|
pacman -Syyu archlinux-keyring --needed --noconfirm || die 1
|
||||||
pacman -S $AL_BASE_PKGS $WM_BASE_PKGS xorg-xinit xorg-server --needed --noconfirm || die 1
|
pacman -S $AL_BASE_PKGS xorg-xinit xorg-server --needed --noconfirm || die 1
|
||||||
for ses; do
|
for ses; do
|
||||||
case "$ses" in
|
case "$ses" in
|
||||||
dwm)
|
dwm)
|
||||||
@ -2153,7 +2165,10 @@ live()
|
|||||||
git clone https://git.suckless.org/$i /root/suckless/$i && cd /root/suckless/$i && make PREFIX=/usr install
|
git clone https://git.suckless.org/$i /root/suckless/$i && cd /root/suckless/$i && make PREFIX=/usr install
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
i3-gaps|oepnbox|fluxbox|bspwm|xfce4|gnome|plasma|cinnamon|awesome)
|
i3-gaps|oepnbox|fluxbox|bspwm|awesome)
|
||||||
|
pacman -S "$ses" $WM_BASE_PKGS ${WM_EXT[$ses]} xterm --needed --noconfirm || die 1
|
||||||
|
;;
|
||||||
|
gnome|plasma|cinnamon|xfce4)
|
||||||
pacman -S "$ses" ${WM_EXT[$ses]} xterm --needed --noconfirm || die 1
|
pacman -S "$ses" ${WM_EXT[$ses]} xterm --needed --noconfirm || die 1
|
||||||
;;
|
;;
|
||||||
*) echo "error: invalid session for -l, --live, see -h, --help"; die 1 ;;
|
*) echo "error: invalid session for -l, --live, see -h, --help"; die 1 ;;
|
||||||
@ -2163,7 +2178,7 @@ live()
|
|||||||
rm -rf "/var/cache/pacman/pkg/"*
|
rm -rf "/var/cache/pacman/pkg/"*
|
||||||
cp -rfT /etc/skel /root || die 1
|
cp -rfT /etc/skel /root || die 1
|
||||||
sed -i "/exec/ c exec ${WM_SESSIONS[$ses]}" /root/.xinitrc
|
sed -i "/exec/ c exec ${WM_SESSIONS[$ses]}" /root/.xinitrc
|
||||||
printf "\n%s has been set as the login session in /root/.xinitrc, to start the session simply run\n\n\tstartx\n\n" "${WM_SESSIONS[$ses]}"
|
printf "\n%s has been set as the login session in ~/.xinitrc, to start the session simply run\n\n\tstartx\n\n" "${WM_SESSIONS[$ses]}"
|
||||||
die 0
|
die 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user