browser installation separated from desktop environment

This commit is contained in:
Tobias Powalowski 2024-06-15 22:35:30 +02:00
parent 75ec910200
commit b7983a4fc7
6 changed files with 32 additions and 26 deletions

View file

@ -85,8 +85,33 @@ if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}
# only start vnc on xorg environment # only start vnc on xorg environment
echo "Setting up VNC and browser..." >"${_LOG}" echo "Setting up VNC and browser..." >"${_LOG}"
[[ -n "${_L_XFCE}" ]] && _autostart_vnc [[ -n "${_L_XFCE}" ]] && _autostart_vnc
command -v firefox &>"${_NO_LOG}" && _firefox_flags if [[ "${_STANDARD_BROWSER}" == "firefox" ]]; then
command -v chromium &>"${_NO_LOG}" && _chromium_flags pacman -Q chromium 2>"${_NO_LOG}" && pacman -Rss --noconfirm chromium
pacman -Q firefox 2>"${_NO_LOG}" || _run_pacman firefox
# install firefox langpacks
_LANG="be bg cs da de el fi fr hu it lt lv mk nl nn pl ro ru sk sr tr uk"
for i in ${_LANG}; do
if grep -q "${i}" /etc/locale.conf; then
_run_pacman firefox-i18n-"${i}"
fi
done
if grep -q en_US /etc/locale.conf; then
_run_pacman firefox-i18n-en-us
elif grep -q 'C.UTF-8' /etc/locale.conf; then
_run_pacman firefox-i18n-en-us
elif grep -q es_ES /etc/locale.conf; then
_run_pacman firefox-i18n-es-es
elif grep -q pt_PT /etc/locale.conf; then
_run_pacman firefox-i18n-pt-pt
elif grep -q sv_SE /etc/locale.conf; then
_run_pacman firefox-i18n-sv-se
fi
_firefox_flags
else
pacman -Q firefox 2>"${_NO_LOG}" && pacman -Rss --noconfirm firefox
pacman -Q chromium 2>"${_NO_LOG}" || _run_pacman chromium
_chromium_flags
fi
if [[ -n "${_L_XFCE}" ]]; then if [[ -n "${_L_XFCE}" ]]; then
_start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99 _start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting ${_ENVIRONMENT}..." 6 75 99
clear clear

View file

@ -57,29 +57,10 @@ _install_graphic() {
_GRAPHIC="${_GRAPHIC} xf86-video-qxl" _GRAPHIC="${_GRAPHIC} xf86-video-qxl"
fi fi
_run_pacman "${_GRAPHIC}" _run_pacman "${_GRAPHIC}"
# install firefox langpacks
if [[ "${_STANDARD_BROWSER}" == "firefox" ]]; then
_LANG="be bg cs da de el fi fr hu it lt lv mk nl nn pl ro ru sk sr tr uk"
for i in ${_LANG}; do
if grep -q "${i}" /etc/locale.conf; then
_run_pacman firefox-i18n-"${i}"
fi
done
if grep -q en_US /etc/locale.conf; then
_run_pacman firefox-i18n-en-us
elif grep -q 'C.UTF-8' /etc/locale.conf; then
_run_pacman firefox-i18n-en-us
elif grep -q es_ES /etc/locale.conf; then
_run_pacman firefox-i18n-es-es
elif grep -q pt_PT /etc/locale.conf; then
_run_pacman firefox-i18n-pt-pt
elif grep -q sv_SE /etc/locale.conf; then
_run_pacman firefox-i18n-sv-se
fi
fi
rm /.archboot rm /.archboot
} }
_prepare_graphic() { _prepare_graphic() {
# fix libs first, then install packages from defaults # fix libs first, then install packages from defaults
_GRAPHIC="${1}" _GRAPHIC="${1}"

View file

@ -34,7 +34,7 @@ _prepare_gnome() {
} }
_install_gnome() { _install_gnome() {
_PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_GNOME_PACKAGES}" _PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_GNOME_PACKAGES}"
_prepare_gnome _prepare_gnome
} }

View file

@ -68,7 +68,7 @@ _prepare_plasma() {
} }
_install_plasma() { _install_plasma() {
_PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_PLASMA_PACKAGES}" _PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_PLASMA_PACKAGES}"
_prepare_plasma _prepare_plasma
} }

View file

@ -99,7 +99,7 @@ EOF
} }
_install_sway() { _install_sway() {
_PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_SWAY_PACKAGES}" _PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_SWAY_PACKAGES}"
if ! [[ -e /usr/bin/sway ]]; then if ! [[ -e /usr/bin/sway ]]; then
_prepare_graphic "${_PACKAGES}" _prepare_graphic "${_PACKAGES}"
_configure_sway >"${_LOG}" 2>&1 _configure_sway >"${_LOG}" 2>&1

View file

@ -3,7 +3,7 @@
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
_install_xfce() { _install_xfce() {
if ! [[ -e /usr/bin/startxfce4 ]]; then if ! [[ -e /usr/bin/startxfce4 ]]; then
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_XFCE_PACKAGES}" _prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_XFCE_PACKAGES}"
_configure_xfce >"${_LOG}" 2>&1 _configure_xfce >"${_LOG}" 2>&1
fi fi
} }