mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
Compare commits
13 commits
fc2693b157
...
fb5226a748
Author | SHA1 | Date | |
---|---|---|---|
|
fb5226a748 | ||
|
b790daf416 | ||
|
13da00c3e7 | ||
|
ee5877fd69 | ||
|
dc917b3c55 | ||
|
88fc96b6c8 | ||
|
bc456dfeb0 | ||
|
410eb22f78 | ||
|
f848b2c0ca | ||
|
39d1bf9d88 | ||
|
9a4761d2c6 | ||
|
7f1ef8bfaf | ||
|
22eb0db0c6 |
5 changed files with 63 additions and 3 deletions
|
@ -22,6 +22,9 @@ _GNOME_PACKAGES="gnome-desktop-4 gnome-shell gnome-terminal gnome-control-center
|
||||||
### KDE/Plasma defaults
|
### KDE/Plasma defaults
|
||||||
# KDE/Plasma packages
|
# KDE/Plasma packages
|
||||||
_PLASMA_PACKAGES="plasma-wayland-session plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
_PLASMA_PACKAGES="plasma-wayland-session plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
||||||
|
### SWAY defaults
|
||||||
|
# Sway packages
|
||||||
|
_SWAY_PACKAGES="sway swaybg foot bemenu-wayland j4-dmenu-desktop"
|
||||||
### Custom Graphical defaults
|
### Custom Graphical defaults
|
||||||
# Custom packages
|
# Custom packages
|
||||||
_CUSTOM_XORG=""
|
_CUSTOM_XORG=""
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
. /usr/lib/archboot/update/gnome-wayland.sh
|
. /usr/lib/archboot/update/gnome-wayland.sh
|
||||||
. /usr/lib/archboot/update/plasma.sh
|
. /usr/lib/archboot/update/plasma.sh
|
||||||
. /usr/lib/archboot/update/plasma-wayland.sh
|
. /usr/lib/archboot/update/plasma-wayland.sh
|
||||||
|
. /usr/lib/archboot/update/sway.sh
|
||||||
|
|
||||||
[[ -z "${1}" ]] && usage
|
[[ -z "${1}" ]] && usage
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case ${1} in
|
case ${1} in
|
||||||
|
@ -19,6 +21,7 @@ while [ $# -gt 0 ]; do
|
||||||
-latest-install|--latest-install) _L_INSTALL_COMPLETE="1";;
|
-latest-install|--latest-install) _L_INSTALL_COMPLETE="1";;
|
||||||
-latest-image|--latest-image) _G_RELEASE="1" ;;
|
-latest-image|--latest-image) _G_RELEASE="1" ;;
|
||||||
-xfce|--xfce) _L_XFCE="1" ;;
|
-xfce|--xfce) _L_XFCE="1" ;;
|
||||||
|
-sway|--sway) _L_SWAY="1" ;;
|
||||||
-gnome|--gnome) _L_GNOME="1";;
|
-gnome|--gnome) _L_GNOME="1";;
|
||||||
-gnome-wayland|--gnome-wayland) _L_GNOME_WAYLAND="1";;
|
-gnome-wayland|--gnome-wayland) _L_GNOME_WAYLAND="1";;
|
||||||
-plasma|--plasma) _L_PLASMA="1" ;;
|
-plasma|--plasma) _L_PLASMA="1" ;;
|
||||||
|
@ -47,7 +50,7 @@ if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then
|
||||||
_custom_wayland_xorg
|
_custom_wayland_xorg
|
||||||
fi
|
fi
|
||||||
# Gnome, KDE/PLASMA or XFCE launch
|
# Gnome, KDE/PLASMA or XFCE launch
|
||||||
if [[ -n "${_L_XFCE}" || -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
|
if [[ -e "/.graphic_installed" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then
|
||||||
_hint_graphic_installed
|
_hint_graphic_installed
|
||||||
else
|
else
|
||||||
|
|
|
@ -9,7 +9,7 @@ _install_plasma_wayland() {
|
||||||
_start_plasma_wayland() {
|
_start_plasma_wayland() {
|
||||||
echo -e "Launching \e[1mKDE/Plasma Wayland\e[m now, logging is done on \e[1m/dev/tty7\e[m..."
|
echo -e "Launching \e[1mKDE/Plasma Wayland\e[m now, logging is done on \e[1m/dev/tty7\e[m..."
|
||||||
echo -e "To relaunch \e[1mKDE/Plasma Wayland\e[m use: \e[92mplasma-wayland\e[m"
|
echo -e "To relaunch \e[1mKDE/Plasma Wayland\e[m use: \e[92mplasma-wayland\e[m"
|
||||||
echo "exec dbus-run-session startplasma-wayland >/dev/tty7 2>&1" > /usr/bin/plasma-wayland
|
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland exec dbus-run-session startplasma-wayland >/dev/tty7 2>&1" > /usr/bin/plasma-wayland
|
||||||
chmod 755 /usr/bin/plasma-wayland
|
chmod 755 /usr/bin/plasma-wayland
|
||||||
plasma-wayland
|
plasma-wayland
|
||||||
}
|
}
|
||||||
|
|
16
usr/lib/archboot/update/sway.sh
Normal file
16
usr/lib/archboot/update/sway.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
|
_install_sway() {
|
||||||
|
_PACKAGES="${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_SWAY_PACKAGES}"
|
||||||
|
_prepare_sway
|
||||||
|
}
|
||||||
|
|
||||||
|
_start_sway() {
|
||||||
|
echo -e "Launching \e[1mSway\e[m now, logging is done on \e[1m/dev/tty7\e[m..."
|
||||||
|
echo -e "To relaunch \e[1mSway\e[m use: \e[92msway-wayland\e[m"
|
||||||
|
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland exec dbus-run-session sway >/dev/tty7 2>&1" > /usr/bin/sway-wayland
|
||||||
|
chmod 755 /usr/bin/sway-wayland
|
||||||
|
sway-wayland
|
||||||
|
}
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
|
@ -53,6 +53,7 @@ usage () {
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then
|
||||||
echo -e " \e[1m-xfce\e[m Launch XFCE desktop with VNC sharing enabled."
|
echo -e " \e[1m-xfce\e[m Launch XFCE desktop with VNC sharing enabled."
|
||||||
echo -e " \e[1m-custom-xorg\e[m Install custom X environment."
|
echo -e " \e[1m-custom-xorg\e[m Install custom X environment."
|
||||||
|
echo -e " \e[1m-sway\e[m Launch Sway desktop."
|
||||||
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] && echo -e " \e[1m-custom-wayland\e[m Install custom Wayland environment."
|
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] && echo -e " \e[1m-custom-wayland\e[m Install custom Wayland environment."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
@ -120,7 +121,7 @@ _download_latest() {
|
||||||
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}"
|
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}"
|
||||||
done
|
done
|
||||||
# update libs
|
# update libs
|
||||||
LIBS="update.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh"
|
LIBS="update.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh sway.sh"
|
||||||
for i in ${LIBS}; do
|
for i in ${LIBS}; do
|
||||||
wget -q "${_SOURCE}${_UPDATE}/${i}?inline=false" -O "${_UPDATE}/${i}"
|
wget -q "${_SOURCE}${_UPDATE}/${i}?inline=false" -O "${_UPDATE}/${i}"
|
||||||
done
|
done
|
||||||
|
@ -519,6 +520,7 @@ _install_graphic () {
|
||||||
[[ -n "${_L_GNOME_WAYLAND}" ]] && _install_gnome_wayland
|
[[ -n "${_L_GNOME_WAYLAND}" ]] && _install_gnome_wayland
|
||||||
[[ -n "${_L_PLASMA}" ]] && _install_plasma
|
[[ -n "${_L_PLASMA}" ]] && _install_plasma
|
||||||
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _install_plasma_wayland
|
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _install_plasma_wayland
|
||||||
|
[[ -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"
|
echo -e "\e[1mStep 3/3:\e[m Setting up VNC and browser...\e[m"
|
||||||
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
||||||
|
@ -529,6 +531,7 @@ _install_graphic () {
|
||||||
[[ -n "${_L_GNOME_WAYLAND}" ]] && _start_gnome_wayland
|
[[ -n "${_L_GNOME_WAYLAND}" ]] && _start_gnome_wayland
|
||||||
[[ -n "${_L_PLASMA}" ]] && _start_plasma
|
[[ -n "${_L_PLASMA}" ]] && _start_plasma
|
||||||
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _start_plasma_wayland
|
[[ -n "${_L_PLASMA_WAYLAND}" ]] && _start_plasma_wayland
|
||||||
|
[[ -n "${_L_SWAY}" ]] && _start_sway
|
||||||
}
|
}
|
||||||
|
|
||||||
_hint_graphic_installed () {
|
_hint_graphic_installed () {
|
||||||
|
@ -563,6 +566,19 @@ _prepare_plasma() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_prepare_sway() {
|
||||||
|
if ! [[ -e /usr/bin/sway ]]; then
|
||||||
|
echo -e "\e[1mStep 1/3:\e[m Installing Sway desktop now..."
|
||||||
|
echo " This will need some time..."
|
||||||
|
_prepare_graphic "${_PACKAGES}" >/dev/tty7 2>&1
|
||||||
|
echo -e "\e[1mStep 2/3:\e[m Configuring Sway desktop..."
|
||||||
|
_configure_sway >/dev/tty7 2>&1
|
||||||
|
else
|
||||||
|
echo -e "\e[1mStep 1/3:\e[m Installing Sway desktop already done..."
|
||||||
|
echo -e "\e[1mStep 2/3:\e[m Configuring Sway desktop already done..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_configure_gnome() {
|
_configure_gnome() {
|
||||||
echo "Configuring Gnome..."
|
echo "Configuring Gnome..."
|
||||||
[[ "${_STANDARD_BROWSER}" == "firefox" ]] && gsettings set org.gnome.shell favorite-apps "['org.gnome.Settings.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'firefox.desktop', 'org.gnome.DiskUtility.desktop', 'gparted.desktop', 'archboot.desktop']"
|
[[ "${_STANDARD_BROWSER}" == "firefox" ]] && gsettings set org.gnome.shell favorite-apps "['org.gnome.Settings.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'firefox.desktop', 'org.gnome.DiskUtility.desktop', 'gparted.desktop', 'archboot.desktop']"
|
||||||
|
@ -645,6 +661,28 @@ EOF
|
||||||
cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/
|
cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_configure_sway() {
|
||||||
|
echo "Configuring Sway..."
|
||||||
|
echo "Enable bemenu..."
|
||||||
|
sed -i -e 's|^set $menu.*|set $menu j4-dmenu-desktop --dmenu=\x27bemenu -i --nb "#3f3f3f" --nf "#dcdccc" --fn "pango:DejaVu Sans Mono 12"\x27 --term="foot" --no-generic|g' /etc/sway/config
|
||||||
|
echo "Setting wallpaper..."
|
||||||
|
sed -i -e 's|^output .*|output * bg /usr/share/archboot/grub/archboot-background.png fill|g' /etc/sway/config
|
||||||
|
echo "Setting tango theme for foot..."
|
||||||
|
grep -q '\[main\]' /etc/xdg/foot/foot.ini ||\
|
||||||
|
echo "[main]" >>/etc/xdg/foot/foot.ini
|
||||||
|
grep -q 'include=/usr/share/foot/themes/tango' /etc/xdg/foot/foot.ini||\
|
||||||
|
echo "include=/usr/share/foot/themes/tango" >>/etc/xdg/foot/foot.ini
|
||||||
|
echo "Autostarting setup..."
|
||||||
|
grep -q 'exec foot' /etc/sway/config ||\
|
||||||
|
echo "exec foot -- /usr/bin/setup" >> /etc/sway/config
|
||||||
|
_HIDE_MENU="avahi-discover bssh bvnc org.codeberg.dnkl.foot-server org.codeberg.dnkl.footclient qvidcap qv4l2"
|
||||||
|
echo "Hiding ${_HIDE_MENU} menu entries..."
|
||||||
|
for i in ${_HIDE_MENU}; do
|
||||||
|
echo "[DESKTOP ENTRY]" > /usr/share/applications/"${i}".desktop
|
||||||
|
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
_custom_wayland_xorg() {
|
_custom_wayland_xorg() {
|
||||||
if [[ -n "${_CUSTOM_WAYLAND}" ]]; then
|
if [[ -n "${_CUSTOM_WAYLAND}" ]]; then
|
||||||
echo -e "\e[1mStep 1/3:\e[m Installing custom wayland..."
|
echo -e "\e[1mStep 1/3:\e[m Installing custom wayland..."
|
||||||
|
|
Loading…
Reference in a new issue