mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add GNOME desktop
This commit is contained in:
parent
f10e32adb0
commit
77d05a5021
3 changed files with 22 additions and 51 deletions
|
@ -20,6 +20,9 @@ _XFCE_PACKAGES="xfce4 breeze-icons gvfs gvfs-smb thunar-archive-plugin file-roll
|
||||||
### KDE defaults
|
### KDE defaults
|
||||||
# KDE/Plasma packages
|
# KDE/Plasma packages
|
||||||
_KDE_PACKAGES="plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
_KDE_PACKAGES="plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
||||||
|
### GNOME defaults
|
||||||
|
# GNOME packages
|
||||||
|
_GNOME_PACKAGES="gnome-shell gnome-terminal gnome-control-center nautilus gvfs-smb gthumb"
|
||||||
### zram setup
|
### zram setup
|
||||||
_ZRAM_ALGORITHM="zstd"
|
_ZRAM_ALGORITHM="zstd"
|
||||||
# default size for all operations
|
# default size for all operations
|
||||||
|
|
|
@ -16,6 +16,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" ;;
|
||||||
-launch-xfce|--launch-xfce) _L_XFCE="1" ;;
|
-launch-xfce|--launch-xfce) _L_XFCE="1" ;;
|
||||||
|
-launch-gnome|--launch-gnome) _L_GNOME="1";;
|
||||||
-launch-kde|--launch-kde) _L_KDE="1" ;;
|
-launch-kde|--launch-kde) _L_KDE="1" ;;
|
||||||
-custom-xorg|--custom-xorg) _CUSTOM_X="1" ;;
|
-custom-xorg|--custom-xorg) _CUSTOM_X="1" ;;
|
||||||
-h|--h|?) usage ;;
|
-h|--h|?) usage ;;
|
||||||
|
@ -103,7 +104,7 @@ if [[ "${_CUSTOM_X}" == "1" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# KDE/PLASMA or XFCE launch
|
# KDE/PLASMA or XFCE launch
|
||||||
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then
|
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1"]]; then
|
||||||
if ! [[ -d /usr.zram ]]; then
|
if ! [[ -d /usr.zram ]]; then
|
||||||
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..."
|
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..."
|
||||||
_zram_usr "${_ZRAM_SIZE}"
|
_zram_usr "${_ZRAM_SIZE}"
|
||||||
|
@ -116,6 +117,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then
|
||||||
if [[ "${_L_XFCE}" == "1" ]]; then
|
if [[ "${_L_XFCE}" == "1" ]]; then
|
||||||
_install_xfce
|
_install_xfce
|
||||||
fi
|
fi
|
||||||
|
if [[ "${_L_GNOME}" == "1" ]]; then
|
||||||
|
_install_gnome
|
||||||
|
fi
|
||||||
if [[ "${_L_KDE}" == "1" ]]; then
|
if [[ "${_L_KDE}" == "1" ]]; then
|
||||||
_install_kde
|
_install_kde
|
||||||
fi
|
fi
|
||||||
|
@ -126,6 +130,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then
|
||||||
if [[ "${_L_XFCE}" == "1" ]]; then
|
if [[ "${_L_XFCE}" == "1" ]]; then
|
||||||
_start_xfce
|
_start_xfce
|
||||||
fi
|
fi
|
||||||
|
if [[ "${_L_GNOME}" == "1" ]]; then
|
||||||
|
_start_gnome
|
||||||
|
fi
|
||||||
if [[ "${_L_KDE}" == "1" ]]; then
|
if [[ "${_L_KDE}" == "1" ]]; then
|
||||||
_start_kde
|
_start_kde
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
|
|
||||||
_install_kde() {
|
_install_gnome() {
|
||||||
if ! [[ -e /usr/bin/startplasma-x11 ]]; then
|
if ! [[ -e /usr/bin/startplasma-x11 ]]; then
|
||||||
echo -e "\033[1mStep 3/5:\033[0m Installing KDE desktop now ..."
|
echo -e "\033[1mStep 3/5:\033[0m Installing GNOME desktop now ..."
|
||||||
echo " This will need some time ..."
|
echo " This will need some time ..."
|
||||||
_prepare_x "${_KDE_PACKAGES}" >/dev/tty7 2>&1
|
_prepare_x "${_GNOME_PACKAGES}" >/dev/tty7 2>&1
|
||||||
echo -e "\033[1mStep 4/5:\033[0m Configuring KDE desktop ..."
|
echo -e "\033[1mStep 4/5:\033[0m Configuring KDE desktop ..."
|
||||||
_configure_kde >/dev/tty7 2>&1
|
_configure_gnome >/dev/tty7 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_start_kde() {
|
_start_gnome() {
|
||||||
echo -e "Launching KDE now, logging is done on \033[1m/dev/tty8\033[0m ..."
|
echo -e "Launching KDE now, logging is done on \033[1m/dev/tty8\033[0m ..."
|
||||||
echo "export DESKTOP_SESSION=plasma" > /root/.xinitrc
|
echo "export DESKTOP_SESSION=plasma" > /root/.xinitrc
|
||||||
echo "startplasma-x11" >> /root/.xinitrc
|
echo "startplasma-x11" >> /root/.xinitrc
|
||||||
|
@ -19,59 +19,20 @@ _start_kde() {
|
||||||
echo -e "To relaunch KDE desktop use: \033[92mstartx\033[0m"
|
echo -e "To relaunch KDE desktop use: \033[92mstartx\033[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
_configure_kde() {
|
_configure_gnome() {
|
||||||
echo "Configuring KDE ..."
|
echo "Configuring KDE ..."
|
||||||
sed -i -e 's#<default>applications:.*#<default>applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,preferred://browser,applications:gparted.desktop,applications:archboot.desktop</default>#g' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
|
#sed -i -e 's#<default>applications:.*#<default>applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,preferred://browser,applications:gparted.desktop,applications:archboot.desktop</default>#g' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
|
||||||
echo "Replacing wallpaper ..."
|
echo "Replacing wallpaper ..."
|
||||||
for i in /usr/share/wallpapers/Next/contents/images/*; do
|
#for i in /usr/share/wallpapers/Next/contents/images/*; do
|
||||||
cp /usr/share/archboot/grub/archboot-background.png $i
|
# cp /usr/share/archboot/grub/archboot-background.png $i
|
||||||
done
|
#done
|
||||||
echo "Replacing menu structure ..."
|
|
||||||
cat << EOF >/etc/xdg/menus/applications.menu
|
|
||||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
|
||||||
|
|
||||||
<Menu>
|
|
||||||
<Name>Applications</Name>
|
|
||||||
<Directory>kde-main.directory</Directory>
|
|
||||||
<!-- Search the default locations -->
|
|
||||||
<DefaultAppDirs/>
|
|
||||||
<DefaultDirectoryDirs/>
|
|
||||||
<DefaultLayout>
|
|
||||||
<Merge type="files"/>
|
|
||||||
<Merge type="menus"/>
|
|
||||||
<Separator/>
|
|
||||||
<Menuname>More</Menuname>
|
|
||||||
</DefaultLayout>
|
|
||||||
<Layout>
|
|
||||||
<Merge type="files"/>
|
|
||||||
<Merge type="menus"/>
|
|
||||||
<Menuname>Applications</Menuname>
|
|
||||||
</Layout>
|
|
||||||
<Menu>
|
|
||||||
<Name>Settingsmenu</Name>
|
|
||||||
<Directory>kf5-settingsmenu.directory</Directory>
|
|
||||||
<Include>
|
|
||||||
<Category>Settings</Category>
|
|
||||||
</Include>
|
|
||||||
</Menu>
|
|
||||||
<DefaultMergeDirs/>
|
|
||||||
<Include>
|
|
||||||
<Filename>archboot.desktop</Filename>
|
|
||||||
<Filename>chromium.desktop</Filename>
|
|
||||||
<Filename>org.kde.dolphin.desktop</Filename>
|
|
||||||
<Filename>gparted.desktop</Filename>
|
|
||||||
<Filename>org.kde.konsole.desktop</Filename>
|
|
||||||
</Include>
|
|
||||||
</Menu>
|
|
||||||
EOF
|
|
||||||
echo "Autostarting setup ..."
|
echo "Autostarting setup ..."
|
||||||
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=Archboot Setup
|
Name=Archboot Setup
|
||||||
GenericName=Installer
|
GenericName=Installer
|
||||||
Exec=konsole -p colors=Linux -e /usr/bin/setup
|
Exec=gnome-terminal /usr/bin/setup
|
||||||
Icon=system-software-install
|
Icon=system-software-install
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue