mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
progressbar xfce
This commit is contained in:
parent
053449a5f5
commit
8e664f03fe
2 changed files with 21 additions and 21 deletions
|
@ -19,12 +19,12 @@ _cleanup_cache() {
|
||||||
_prepare_graphic() {
|
_prepare_graphic() {
|
||||||
_GRAPHIC="${1}"
|
_GRAPHIC="${1}"
|
||||||
if [[ ! -e "/.full_system" ]]; then
|
if [[ ! -e "/.full_system" ]]; then
|
||||||
echo "Removing firmware files..."
|
_progress "2" "Removing firmware files..."
|
||||||
rm -rf /usr/lib/firmware
|
rm -rf /usr/lib/firmware
|
||||||
# fix libs first, then install packages from defaults
|
# fix libs first, then install packages from defaults
|
||||||
_GRAPHIC="${_FIX_PACKAGES} ${1}"
|
_GRAPHIC="${_FIX_PACKAGES} ${1}"
|
||||||
fi
|
fi
|
||||||
echo "Updating environment to latest packages (ignoring packages: ${_GRAPHIC_IGNORE})..."
|
_progress 3 "Updating environment to latest packages (ignoring packages: ${_GRAPHIC_IGNORE})..."
|
||||||
_IGNORE=""
|
_IGNORE=""
|
||||||
if [[ -n "${_GRAPHIC_IGNORE}" ]]; then
|
if [[ -n "${_GRAPHIC_IGNORE}" ]]; then
|
||||||
for i in ${_GRAPHIC_IGNORE}; do
|
for i in ${_GRAPHIC_IGNORE}; do
|
||||||
|
@ -36,7 +36,7 @@ _prepare_graphic() {
|
||||||
[[ ! -e "/.full_system" ]] && _cleanup_install
|
[[ ! -e "/.full_system" ]] && _cleanup_install
|
||||||
# check for qxl module
|
# check for qxl module
|
||||||
grep -q qxl /proc/modules && grep -q xorg "${_GRAPHIC}" && _GRAPHIC="${_GRAPHIC} xf86-video-qxl"
|
grep -q qxl /proc/modules && grep -q xorg "${_GRAPHIC}" && _GRAPHIC="${_GRAPHIC} xf86-video-qxl"
|
||||||
echo "Running pacman to install packages: ${_GRAPHIC}..."
|
progress "4" "Running pacman to install packages: ${_GRAPHIC}..."
|
||||||
for i in ${_GRAPHIC}; do
|
for i in ${_GRAPHIC}; do
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
pacman -S ${i} --noconfirm &>"${_NO_LOG}" || exit 1
|
pacman -S ${i} --noconfirm &>"${_NO_LOG}" || exit 1
|
||||||
|
@ -46,6 +46,7 @@ _prepare_graphic() {
|
||||||
done
|
done
|
||||||
# install firefox langpacks
|
# install firefox langpacks
|
||||||
if [[ "${_STANDARD_BROWSER}" == "firefox" ]]; then
|
if [[ "${_STANDARD_BROWSER}" == "firefox" ]]; then
|
||||||
|
_progress "10" "Installing firefox langpack..."
|
||||||
_LANG="be bg cs da de el fi fr hu it lt lv mk nl nn pl ro ru sk sr uk"
|
_LANG="be bg cs da de el fi fr hu it lt lv mk nl nn pl ro ru sk sr uk"
|
||||||
for i in ${_LANG}; do
|
for i in ${_LANG}; do
|
||||||
if grep -q "${i}" /etc/locale.conf; then
|
if grep -q "${i}" /etc/locale.conf; then
|
||||||
|
@ -63,9 +64,9 @@ _prepare_graphic() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ ! -e "/.full_system" ]]; then
|
if [[ ! -e "/.full_system" ]]; then
|
||||||
echo "Removing not used icons..."
|
_progress "20" "Removing not used icons..."
|
||||||
rm -rf /usr/share/icons/breeze-dark
|
rm -rf /usr/share/icons/breeze-dark
|
||||||
echo "Cleanup locale and i18n..."
|
_progress "30" "Cleanup locale and i18n..."
|
||||||
find /usr/share/locale/ -mindepth 2 ! -path '*/be/*' ! -path '*/bg/*' ! -path '*/cs/*' \
|
find /usr/share/locale/ -mindepth 2 ! -path '*/be/*' ! -path '*/bg/*' ! -path '*/cs/*' \
|
||||||
! -path '*/da/*' ! -path '*/de/*' ! -path '*/en/*' ! -path '*/el/*' ! -path '*/es/*' \
|
! -path '*/da/*' ! -path '*/de/*' ! -path '*/en/*' ! -path '*/el/*' ! -path '*/es/*' \
|
||||||
! -path '*/fi/*' ! -path '*/fr/*' ! -path '*/hu/*' ! -path '*/it/*' ! -path '*/lt/*' \
|
! -path '*/fi/*' ! -path '*/fr/*' ! -path '*/hu/*' ! -path '*/it/*' ! -path '*/lt/*' \
|
||||||
|
@ -74,6 +75,7 @@ _prepare_graphic() {
|
||||||
! -path '*/sv/*' ! -path '*/uk/*' -delete &>"${_NO_LOG}"
|
! -path '*/sv/*' ! -path '*/uk/*' -delete &>"${_NO_LOG}"
|
||||||
find /usr/share/i18n/charmaps ! -name 'UTF-8.gz' -delete &>"${_NO_LOG}"
|
find /usr/share/i18n/charmaps ! -name 'UTF-8.gz' -delete &>"${_NO_LOG}"
|
||||||
fi
|
fi
|
||||||
|
_progress "40" "Restart dbus..."
|
||||||
systemd-sysusers >"${_LOG}" 2>&1
|
systemd-sysusers >"${_LOG}" 2>&1
|
||||||
systemd-tmpfiles --create >"${_LOG}" 2>&1
|
systemd-tmpfiles --create >"${_LOG}" 2>&1
|
||||||
# fixing dbus requirements
|
# fixing dbus requirements
|
||||||
|
@ -83,7 +85,6 @@ _prepare_graphic() {
|
||||||
|
|
||||||
_install_graphic () {
|
_install_graphic () {
|
||||||
[[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed
|
[[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed
|
||||||
echo -e "\e[1mInitializing desktop environment...\e[m"
|
|
||||||
[[ -n "${_L_XFCE}" ]] && _install_xfce
|
[[ -n "${_L_XFCE}" ]] && _install_xfce
|
||||||
[[ -n "${_L_GNOME}" ]] && _install_gnome
|
[[ -n "${_L_GNOME}" ]] && _install_gnome
|
||||||
[[ -n "${_L_GNOME_WAYLAND}" ]] && _install_gnome_wayland
|
[[ -n "${_L_GNOME_WAYLAND}" ]] && _install_gnome_wayland
|
||||||
|
@ -91,7 +92,7 @@ _install_graphic () {
|
||||||
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _install_plasma_wayland
|
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _install_plasma_wayland
|
||||||
[[ -n "${_L_SWAY}" ]] && _install_sway
|
[[ -n "${_L_SWAY}" ]] && _install_sway
|
||||||
# only start vnc on xorg environment
|
# only start vnc on xorg environment
|
||||||
echo -e "\e[1mStep 3/3:\e[m Setting up VNC and browser...\e[m"
|
_progress "93" "Setting up VNC and browser..."
|
||||||
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
||||||
command -v firefox &>"${_NO_LOG}" && _firefox_flags
|
command -v firefox &>"${_NO_LOG}" && _firefox_flags
|
||||||
command -v chromium &>"${_NO_LOG}" && _chromium_flags
|
command -v chromium &>"${_NO_LOG}" && _chromium_flags
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
# 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
|
||||||
echo -e "\e[1mStep 1/3:\e[m Installing XFCE desktop now..."
|
_progress "1" "Installing XFCE desktop now..."
|
||||||
echo " This will need some time..."
|
|
||||||
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_XFCE_PACKAGES}" >/dev/tty7 2>&1
|
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_XFCE_PACKAGES}" >/dev/tty7 2>&1
|
||||||
echo -e "\e[1mStep 2/3:\e[m Configuring XFCE desktop..."
|
_progress "50" "Configuring XFCE desktop..."
|
||||||
_configure_xfce >/dev/tty7 2>&1
|
_configure_xfce >/dev/tty7 2>&1
|
||||||
else
|
else
|
||||||
echo -e "\e[1mStep 1/3:\e[m Installing XFCE desktop already done..."
|
echo -e "\e[1mStep 1/3:\e[m Installing XFCE desktop already done..."
|
||||||
|
@ -15,7 +14,7 @@ _install_xfce() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_configure_xfce() {
|
_configure_xfce() {
|
||||||
echo "Configuring xfce panel..."
|
_progress "60" "Configuring xfce panel..."
|
||||||
cat << EOF >/etc/xdg/xfce4/panel/default.xml
|
cat << EOF >/etc/xdg/xfce4/panel/default.xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
@ -127,10 +126,10 @@ _configure_xfce() {
|
||||||
</property>
|
</property>
|
||||||
</channel>
|
</channel>
|
||||||
EOF
|
EOF
|
||||||
echo "Setting breeze as default icons..."
|
_progress "70" "Setting breeze as default icons..."
|
||||||
sed -i -e 's#<property name="IconThemeName" type="string" value="Adwaita"/>#<property name="IconThemeName" type="string" value="breeze"/>#g' \
|
sed -i -e 's#<property name="IconThemeName" type="string" value="Adwaita"/>#<property name="IconThemeName" type="string" value="breeze"/>#g' \
|
||||||
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||||
echo "Setting archboot background image..."
|
_progress "80" "Setting archboot background image..."
|
||||||
cat << EOF >/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
|
cat << EOF >/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
@ -167,13 +166,13 @@ EOF
|
||||||
</property>
|
</property>
|
||||||
</channel>
|
</channel>
|
||||||
EOF
|
EOF
|
||||||
echo "Replacing appfinder launcher with gparted..."
|
_prgress "85" "Replacing appfinder launcher with gparted..."
|
||||||
sed -i -e 's#xfce4-appfinder#gparted#g' /etc/xdg/xfce4/panel/default.xml
|
sed -i -e 's#xfce4-appfinder#gparted#g' /etc/xdg/xfce4/panel/default.xml
|
||||||
echo "Replacing directory menu launcher with setup..."
|
_progress "86" "Replacing directory menu launcher with setup..."
|
||||||
sed -i -e 's#directorymenu#archboot#g' /etc/xdg/xfce4/panel/default.xml
|
sed -i -e 's#directorymenu#archboot#g' /etc/xdg/xfce4/panel/default.xml
|
||||||
echo "Setting ${_STANDARD_BROWSER} as default browser..."
|
_progress "87" "Setting ${_STANDARD_BROWSER} as default browser..."
|
||||||
sed -i -e "s#firefox#${_STANDARD_BROWSER}#g" /etc/xdg/xfce4/helpers.rc
|
sed -i -e "s#firefox#${_STANDARD_BROWSER}#g" /etc/xdg/xfce4/helpers.rc
|
||||||
echo "Replacing menu structure..."
|
_progress "88" "Replacing menu structure..."
|
||||||
cat << EOF >/etc/xdg/menus/xfce-applications.menu
|
cat << EOF >/etc/xdg/menus/xfce-applications.menu
|
||||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||||
|
@ -230,14 +229,14 @@ EOF
|
||||||
|
|
||||||
</Menu>
|
</Menu>
|
||||||
EOF
|
EOF
|
||||||
echo "Adding gparted to xfce top level menu..."
|
_progress "89" "Adding gparted to xfce top level menu..."
|
||||||
sed -i -e 's#Categories=.*#Categories=X-Xfce-Toplevel;#g' /usr/share/applications/gparted.desktop
|
sed -i -e 's#Categories=.*#Categories=X-Xfce-Toplevel;#g' /usr/share/applications/gparted.desktop
|
||||||
_HIDE_MENU="xfce4-mail-reader xfce4-about"
|
_HIDE_MENU="xfce4-mail-reader xfce4-about"
|
||||||
echo "Hiding ${_HIDE_MENU} menu entries..."
|
_progress "90" "Hiding ${_HIDE_MENU} menu entries..."
|
||||||
for i in ${_HIDE_MENU}; do
|
for i in ${_HIDE_MENU}; do
|
||||||
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
||||||
done
|
done
|
||||||
echo "Autostarting setup..."
|
_progress "91" "Autostarting setup..."
|
||||||
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -251,7 +250,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
_start_xfce() {
|
_start_xfce() {
|
||||||
echo -e "Launching \e[1mXFCE\e[m now, logging is done on \e[1m/dev/tty8\e[m..."
|
_progress "100" "Launching XFCE now, logging is done on /dev/tty8..."
|
||||||
startxfce4 >/dev/tty8 2>&1
|
startxfce4 >/dev/tty8 2>&1
|
||||||
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
|
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue