simplify and add it to other DEs too

This commit is contained in:
Tobias Powalowski 2023-08-04 12:19:20 +02:00
parent cd7605f9ba
commit b80bc55052

View file

@ -68,62 +68,58 @@ if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then
fi fi
# Gnome, KDE/PLASMA or XFCE launch # Gnome, KDE/PLASMA or XFCE launch
if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" || -n "${_L_GNOME_WAYLAND}" || -n "${_L_PLASMA_WAYLAND}" ]]; then if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" || -n "${_L_GNOME_WAYLAND}" || -n "${_L_PLASMA_WAYLAND}" ]]; then
if [[ -e "/.graphic_installed" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then touch /.update
_hint_graphic_installed _TITLE="Archboot $(uname -m) | Basic Setup | Desktop Environment"
else [[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed
touch /.update if [[ -n "${_L_XFCE}" ]]; then
_TITLE="Archboot $(uname -m) | Basic Setup | Desktop Environment" _ENVIRONMENT="XFCE"
[[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed _install_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
if [[ -n "${_L_XFCE}" ]]; then elif [[ -n "${_L_GNOME}" ]]; then
_ENVIRONMENT="XFCE" _ENVIRONMENT="GNOME"
_install_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 _install_gnome | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
elif [[ -n "${_L_GNOME}" ]]; then elif [[ -n "${_L_GNOME_WAYLAND}" ]]; then
_ENVIRONMENT="GNOME" _ENVIRONMENT="GNOME Wayland"
_install_gnome | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 _install_gnome_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
elif [[ -n "${_L_GNOME_WAYLAND}" ]]; then elif [[ -n "${_L_PLASMA}" ]];then
_ENVIRONMENT="GNOME Wayland" _ENVIRONMENT="Plasma/KDE"
_install_gnome_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 _install_plasma | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
elif [[ -n "${_L_PLASMA}" ]];then elif [[ -n "${_L_PLASMA_WAYLAND}" ]]; then
_ENVIRONMENT="Plasma/KDE" _ENVIRONMENT="Plasma/KDE Wayland"
_install_plasma | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 _install_plasma_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
elif [[ -n "${_L_PLASMA_WAYLAND}" ]]; then elif [[ -n "${_L_SWAY}" ]]; then
_ENVIRONMENT="Plasma/KDE Wayland" _ENVIRONMENT="Sway"
_install_plasma_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 _install_sway | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
elif [[ -n "${_L_SWAY}" ]]; then fi
_ENVIRONMENT="Sway" rm /.update
_install_sway | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0 # only start vnc on xorg environment
fi echo "Setting up VNC and browser..." >"${_LOG}"
# only start vnc on xorg environment [[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
echo "Setting up VNC and browser..." >"${_LOG}" command -v firefox &>"${_NO_LOG}" && _firefox_flags
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc command -v chromium &>"${_NO_LOG}" && _chromium_flags
command -v firefox &>"${_NO_LOG}" && _firefox_flags if [[ -n "${_L_XFCE}" ]]; then
command -v chromium &>"${_NO_LOG}" && _chromium_flags _start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
if [[ -n "${_L_XFCE}" ]]; then clear
_start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
clear elif [[ -n "${_L_GNOME}" ]]; then
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m" _start_gnome | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
elif [[ -n "${_L_GNOME}" ]]; then clear
_start_gnome | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mGNOME\e[m desktop use: \e[92mstartx\e[m"
clear elif [[ -n "${_L_GNOME_WAYLAND}" ]]; then
echo -e "To relaunch \e[1mGNOME\e[m desktop use: \e[92mstartx\e[m" _start_gnome_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
elif [[ -n "${_L_GNOME_WAYLAND}" ]]; then clear
_start_gnome_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mGNOME Wayland\e[m use: \e[92mgnome-wayland\e[m"
clear elif [[ -n "${_L_PLASMA}" ]]; then
echo -e "To relaunch \e[1mGNOME Wayland\e[m use: \e[92mgnome-wayland\e[m" _start_plasma | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
elif [[ -n "${_L_PLASMA}" ]]; then clear
_start_plasma | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mKDE/Plasma\e[m desktop use: \e[92mstartx\e[m"
clear elif [[ -n "${_L_PLASMA_WAYLAND}" ]]; then
echo -e "To relaunch \e[1mKDE/Plasma\e[m desktop use: \e[92mstartx\e[m" _start_plasma_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
elif [[ -n "${_L_PLASMA_WAYLAND}" ]]; then clear
_start_plasma_wayland | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mKDE/Plasma Wayland\e[m use: \e[92mplasma-wayland\e[m"
clear elif [[ -n "${_L_SWAY}" ]]; then
echo -e "To relaunch \e[1mKDE/Plasma Wayland\e[m use: \e[92mplasma-wayland\e[m" _start_sway | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
elif [[ -n "${_L_SWAY}" ]]; then clear
_start_sway | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 echo -e "To relaunch \e[1mSway\e[m use: \e[92msway-wayland\e[m"
clear
echo -e "To relaunch \e[1mSway\e[m use: \e[92msway-wayland\e[m"
fi
rm /.update
fi fi
fi fi
# Switch to full Arch Linux system # Switch to full Arch Linux system