Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/default_profiles/desktops
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
commit683da22298abbd90f51d4dd38a7ec4b0dfb04555 (patch)
treeec2ac04967f9277df038edc362201937b331abe5 /archinstall/default_profiles/desktops
parentaf7ab9833c9f9944874f0162ae0975175ddc628d (diff)
parent3381cd55673e5105697d354cf4a1be9a7bcef062 (diff)
merged with upstreamHEADmaster
Diffstat (limited to 'archinstall/default_profiles/desktops')
-rw-r--r--archinstall/default_profiles/desktops/__init__.py0
-rw-r--r--archinstall/default_profiles/desktops/awesome.py63
-rw-r--r--archinstall/default_profiles/desktops/bspwm.py27
-rw-r--r--archinstall/default_profiles/desktops/budgie.py26
-rw-r--r--archinstall/default_profiles/desktops/cinnamon.py27
-rw-r--r--archinstall/default_profiles/desktops/cutefish.py27
-rw-r--r--archinstall/default_profiles/desktops/deepin.py24
-rw-r--r--archinstall/default_profiles/desktops/enlightenment.py23
-rw-r--r--archinstall/default_profiles/desktops/gnome.py23
-rw-r--r--archinstall/default_profiles/desktops/hyprland.py68
-rw-r--r--archinstall/default_profiles/desktops/i3.py29
-rw-r--r--archinstall/default_profiles/desktops/lxqt.py31
-rw-r--r--archinstall/default_profiles/desktops/mate.py23
-rw-r--r--archinstall/default_profiles/desktops/plasma.py27
-rw-r--r--archinstall/default_profiles/desktops/qtile.py23
-rw-r--r--archinstall/default_profiles/desktops/sway.py77
-rw-r--r--archinstall/default_profiles/desktops/xfce4.py26
17 files changed, 544 insertions, 0 deletions
diff --git a/archinstall/default_profiles/desktops/__init__.py b/archinstall/default_profiles/desktops/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/archinstall/default_profiles/desktops/__init__.py
diff --git a/archinstall/default_profiles/desktops/awesome.py b/archinstall/default_profiles/desktops/awesome.py
new file mode 100644
index 00000000..3833ce71
--- /dev/null
+++ b/archinstall/default_profiles/desktops/awesome.py
@@ -0,0 +1,63 @@
+from typing import List, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ from archinstall.lib.installer import Installer
+ _: Any
+
+
+class AwesomeProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Awesome', ProfileType.WindowMgr, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return super().packages + [
+ 'awesome',
+ 'alacritty',
+ 'xorg-xinit',
+ 'xorg-xrandr',
+ 'xterm',
+ 'feh',
+ 'slock',
+ 'terminus-font',
+ 'gnu-free-fonts',
+ 'ttf-liberation',
+ 'xsel',
+ ]
+
+ def install(self, install_session: 'Installer'):
+ super().install(install_session)
+
+ # TODO: Copy a full configuration to ~/.config/awesome/rc.lua instead.
+ with open(f"{install_session.target}/etc/xdg/awesome/rc.lua", 'r') as fh:
+ awesome_lua = fh.read()
+
+ # Replace xterm with alacritty for a smoother experience.
+ awesome_lua = awesome_lua.replace('"xterm"', '"alacritty"')
+
+ with open(f"{install_session.target}/etc/xdg/awesome/rc.lua", 'w') as fh:
+ fh.write(awesome_lua)
+
+ # TODO: Configure the right-click-menu to contain the above packages that were installed. (as a user config)
+
+ # TODO: check if we selected a greeter,
+ # but for now, awesome is intended to run without one.
+ with open(f"{install_session.target}/etc/X11/xinit/xinitrc", 'r') as xinitrc:
+ xinitrc_data = xinitrc.read()
+
+ for line in xinitrc_data.split('\n'):
+ if "twm &" in line:
+ xinitrc_data = xinitrc_data.replace(line, f"# {line}")
+ if "xclock" in line:
+ xinitrc_data = xinitrc_data.replace(line, f"# {line}")
+ if "xterm" in line:
+ xinitrc_data = xinitrc_data.replace(line, f"# {line}")
+
+ xinitrc_data += '\n'
+ xinitrc_data += 'exec awesome\n'
+
+ with open(f"{install_session.target}/etc/X11/xinit/xinitrc", 'w') as xinitrc:
+ xinitrc.write(xinitrc_data) \ No newline at end of file
diff --git a/archinstall/default_profiles/desktops/bspwm.py b/archinstall/default_profiles/desktops/bspwm.py
new file mode 100644
index 00000000..61eeba43
--- /dev/null
+++ b/archinstall/default_profiles/desktops/bspwm.py
@@ -0,0 +1,27 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class BspwmProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Bspwm', ProfileType.WindowMgr, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ # return super().packages + [
+ return [
+ 'bspwm',
+ 'sxhkd',
+ 'dmenu',
+ 'xdo',
+ 'rxvt-unicode'
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/budgie.py b/archinstall/default_profiles/desktops/budgie.py
new file mode 100644
index 00000000..28c05f45
--- /dev/null
+++ b/archinstall/default_profiles/desktops/budgie.py
@@ -0,0 +1,26 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class BudgieProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Budgie', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "arc-gtk-theme",
+ "budgie",
+ "mate-terminal",
+ "nemo",
+ "papirus-icon-theme"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.LightdmSlick
diff --git a/archinstall/default_profiles/desktops/cinnamon.py b/archinstall/default_profiles/desktops/cinnamon.py
new file mode 100644
index 00000000..a819b4d1
--- /dev/null
+++ b/archinstall/default_profiles/desktops/cinnamon.py
@@ -0,0 +1,27 @@
+from typing import Optional, List, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class CinnamonProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Cinnamon', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "cinnamon",
+ "system-config-printer",
+ "gnome-keyring",
+ "gnome-terminal",
+ "blueberry",
+ "metacity"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/cutefish.py b/archinstall/default_profiles/desktops/cutefish.py
new file mode 100644
index 00000000..c4202920
--- /dev/null
+++ b/archinstall/default_profiles/desktops/cutefish.py
@@ -0,0 +1,27 @@
+from typing import Optional, List, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ from archinstall.lib.installer import Installer
+ _: Any
+
+
+class CutefishProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Cutefish', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "cutefish",
+ "noto-fonts"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Sddm
+
+ def install(self, install_session: 'Installer'):
+ super().install(install_session)
diff --git a/archinstall/default_profiles/desktops/deepin.py b/archinstall/default_profiles/desktops/deepin.py
new file mode 100644
index 00000000..e6a9f6b5
--- /dev/null
+++ b/archinstall/default_profiles/desktops/deepin.py
@@ -0,0 +1,24 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class DeepinProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Deepin', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "deepin",
+ "deepin-terminal",
+ "deepin-editor"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/enlightenment.py b/archinstall/default_profiles/desktops/enlightenment.py
new file mode 100644
index 00000000..7dd7822a
--- /dev/null
+++ b/archinstall/default_profiles/desktops/enlightenment.py
@@ -0,0 +1,23 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class EnlighenmentProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Enlightenment', ProfileType.WindowMgr, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "enlightenment",
+ "terminology"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/gnome.py b/archinstall/default_profiles/desktops/gnome.py
new file mode 100644
index 00000000..24ade437
--- /dev/null
+++ b/archinstall/default_profiles/desktops/gnome.py
@@ -0,0 +1,23 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class GnomeProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Gnome', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ 'gnome',
+ 'gnome-tweaks'
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Gdm
diff --git a/archinstall/default_profiles/desktops/hyprland.py b/archinstall/default_profiles/desktops/hyprland.py
new file mode 100644
index 00000000..0c5452eb
--- /dev/null
+++ b/archinstall/default_profiles/desktops/hyprland.py
@@ -0,0 +1,68 @@
+from enum import Enum
+from typing import List, Optional, TYPE_CHECKING, Any
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+from archinstall.lib.menu import Menu
+
+if TYPE_CHECKING:
+ from archinstall.lib.installer import Installer
+ _: Any
+
+
+class SeatAccess(Enum):
+ seatd = 'seatd'
+ polkit = 'polkit'
+
+
+class HyprlandProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Hyprland', ProfileType.DesktopEnv, description='')
+
+ self.custom_settings = {'seat_access': None}
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "hyprland",
+ "dunst",
+ "kitty",
+ "dolphin",
+ "wofi",
+ "xdg-desktop-portal-hyprland",
+ "qt5-wayland",
+ "qt6-wayland",
+ "polkit-kde-agent",
+ "grim",
+ "slurp"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Sddm
+
+ @property
+ def services(self) -> List[str]:
+ if pref := self.custom_settings.get('seat_access', None):
+ return [pref]
+ return []
+
+ def _ask_seat_access(self):
+ # need to activate seat service and add to seat group
+ title = str(_('Hyprland needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
+ title += str(_('\n\nChoose an option to give Hyprland access to your hardware'))
+
+ options = [e.value for e in SeatAccess]
+ default = None
+
+ if seat := self.custom_settings.get('seat_access', None):
+ default = seat
+
+ choice = Menu(title, options, skip=False, preset_values=default).run()
+ self.custom_settings['seat_access'] = choice.single_value
+
+ def do_on_select(self):
+ self._ask_seat_access()
+
+ def install(self, install_session: 'Installer'):
+ super().install(install_session)
diff --git a/archinstall/default_profiles/desktops/i3.py b/archinstall/default_profiles/desktops/i3.py
new file mode 100644
index 00000000..9c2994de
--- /dev/null
+++ b/archinstall/default_profiles/desktops/i3.py
@@ -0,0 +1,29 @@
+from typing import Optional, List, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class I3wmProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('i3-wm', ProfileType.WindowMgr, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ 'i3-wm',
+ 'i3lock',
+ 'i3status',
+ 'i3blocks',
+ 'xterm',
+ 'lightdm-gtk-greeter',
+ 'lightdm',
+ 'dmenu'
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/lxqt.py b/archinstall/default_profiles/desktops/lxqt.py
new file mode 100644
index 00000000..5d75e08d
--- /dev/null
+++ b/archinstall/default_profiles/desktops/lxqt.py
@@ -0,0 +1,31 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class LxqtProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Lxqt', ProfileType.DesktopEnv, description='')
+
+ # NOTE: SDDM is the only officially supported greeter for LXQt, so unlike other DEs, lightdm is not used here.
+ # LXQt works with lightdm, but since this is not supported, we will not default to this.
+ # https://github.com/lxqt/lxqt/issues/795
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "lxqt",
+ "breeze-icons",
+ "oxygen-icons",
+ "xdg-utils",
+ "ttf-freefont",
+ "leafpad",
+ "slock"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Sddm
diff --git a/archinstall/default_profiles/desktops/mate.py b/archinstall/default_profiles/desktops/mate.py
new file mode 100644
index 00000000..d3c4a6e1
--- /dev/null
+++ b/archinstall/default_profiles/desktops/mate.py
@@ -0,0 +1,23 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class MateProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Mate', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "mate",
+ "mate-extra"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/plasma.py b/archinstall/default_profiles/desktops/plasma.py
new file mode 100644
index 00000000..bcc1ea1b
--- /dev/null
+++ b/archinstall/default_profiles/desktops/plasma.py
@@ -0,0 +1,27 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+class PlasmaProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('KDE Plasma', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "plasma-meta",
+ "konsole",
+ "kwrite",
+ "dolphin",
+ "ark",
+ "plasma-workspace",
+ "egl-wayland"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Sddm
diff --git a/archinstall/default_profiles/desktops/qtile.py b/archinstall/default_profiles/desktops/qtile.py
new file mode 100644
index 00000000..96e93b1d
--- /dev/null
+++ b/archinstall/default_profiles/desktops/qtile.py
@@ -0,0 +1,23 @@
+from typing import Optional, List, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class QtileProfile(XorgProfile):
+ def __init__(self):
+ super().__init__('Qtile', ProfileType.WindowMgr, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ 'qtile',
+ 'alacritty'
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
diff --git a/archinstall/default_profiles/desktops/sway.py b/archinstall/default_profiles/desktops/sway.py
new file mode 100644
index 00000000..c757797d
--- /dev/null
+++ b/archinstall/default_profiles/desktops/sway.py
@@ -0,0 +1,77 @@
+from enum import Enum
+from typing import List, Optional, TYPE_CHECKING, Any
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+from archinstall.lib.menu import Menu
+
+if TYPE_CHECKING:
+ from archinstall.lib.installer import Installer
+ _: Any
+
+
+class SeatAccess(Enum):
+ seatd = 'seatd'
+ polkit = 'polkit'
+
+
+class SwayProfile(XorgProfile):
+ def __init__(self):
+ super().__init__(
+ 'Sway',
+ ProfileType.WindowMgr,
+ description=''
+ )
+
+ self.custom_settings = {'seat_access': None}
+
+ @property
+ def packages(self) -> List[str]:
+ additional = []
+ if seat := self.custom_settings.get('seat_access', None):
+ additional = [seat]
+
+ return [
+ "sway",
+ "swaybg",
+ "swaylock",
+ "swayidle",
+ "waybar",
+ "dmenu",
+ "brightnessctl",
+ "grim",
+ "slurp",
+ "pavucontrol",
+ "foot",
+ "xorg-xwayland"
+ ] + additional
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm
+
+ @property
+ def services(self) -> List[str]:
+ if pref := self.custom_settings.get('seat_access', None):
+ return [pref]
+ return []
+
+ def _ask_seat_access(self):
+ # need to activate seat service and add to seat group
+ title = str(_('Sway needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
+ title += str(_('\n\nChoose an option to give Sway access to your hardware'))
+
+ options = [e.value for e in SeatAccess]
+ default = None
+
+ if seat := self.custom_settings.get('seat_access', None):
+ default = seat
+
+ choice = Menu(title, options, skip=False, preset_values=default).run()
+ self.custom_settings['seat_access'] = choice.single_value
+
+ def do_on_select(self):
+ self._ask_seat_access()
+
+ def install(self, install_session: 'Installer'):
+ super().install(install_session)
diff --git a/archinstall/default_profiles/desktops/xfce4.py b/archinstall/default_profiles/desktops/xfce4.py
new file mode 100644
index 00000000..a7f0a7e6
--- /dev/null
+++ b/archinstall/default_profiles/desktops/xfce4.py
@@ -0,0 +1,26 @@
+from typing import List, Optional, Any, TYPE_CHECKING
+
+from archinstall.default_profiles.profile import ProfileType, GreeterType
+from archinstall.default_profiles.xorg import XorgProfile
+
+if TYPE_CHECKING:
+ _: Any
+
+
+class Xfce4Profile(XorgProfile):
+ def __init__(self):
+ super().__init__('Xfce4', ProfileType.DesktopEnv, description='')
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ "xfce4",
+ "xfce4-goodies",
+ "pavucontrol",
+ "gvfs",
+ "xarchiver"
+ ]
+
+ @property
+ def default_greeter_type(self) -> Optional[GreeterType]:
+ return GreeterType.Lightdm