Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion archinstall/default_profiles/desktops/awesome.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def packages(self) -> list[str]:
return super().packages + [
'awesome',
'alacritty',
'xorg-xinit',
'xorg-xrandr',
'xterm',
'feh',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/bspwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self) -> None:
@override
def packages(self) -> list[str]:
# return super().packages + [
return [
return super().packages + [
'bspwm',
'sxhkd',
'dmenu',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/budgie.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'materia-gtk-theme',
'budgie',
'mate-terminal',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/cinnamon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'cinnamon',
'system-config-printer',
'gnome-keyring',
Expand Down
12 changes: 8 additions & 4 deletions archinstall/default_profiles/desktops/cosmic.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from typing import override

from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType


class CosmicProfile(XorgProfile):
class CosmicProfile(Profile):
def __init__(self) -> None:
super().__init__('Cosmic', ProfileType.DesktopEnv)
super().__init__(
'Cosmic',
ProfileType.DesktopEnv,
support_gfx_driver=True,
is_wayland=True,
)

@property
@override
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/cutefish.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'cutefish',
'noto-fonts',
]
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/deepin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'deepin',
'deepin-terminal',
'deepin-editor',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/enlightenment.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'enlightenment',
'terminology',
]
Expand Down
12 changes: 8 additions & 4 deletions archinstall/default_profiles/desktops/gnome.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from typing import override

from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType


class GnomeProfile(XorgProfile):
class GnomeProfile(Profile):
def __init__(self) -> None:
super().__init__('GNOME', ProfileType.DesktopEnv)
super().__init__(
'GNOME',
ProfileType.DesktopEnv,
support_gfx_driver=True,
is_wayland=True,
)

@property
@override
Expand Down
12 changes: 8 additions & 4 deletions archinstall/default_profiles/desktops/hyprland.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
from typing import override

from archinstall.default_profiles.desktops import SeatAccess
from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType
from archinstall.lib.menu.helpers import Selection
from archinstall.lib.translationhandler import tr
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.ui.result import ResultType


class HyprlandProfile(XorgProfile):
class HyprlandProfile(Profile):
def __init__(self) -> None:
super().__init__('Hyprland', ProfileType.DesktopEnv)
super().__init__(
'Hyprland',
ProfileType.DesktopEnv,
support_gfx_driver=True,
is_wayland=True,
)

self.custom_settings = {'seat_access': None}

Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/i3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'i3-wm',
'i3lock',
'i3status',
Expand Down
7 changes: 4 additions & 3 deletions archinstall/default_profiles/desktops/labwc.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from typing import override

from archinstall.default_profiles.desktops import SeatAccess
from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType
from archinstall.lib.menu.helpers import Selection
from archinstall.lib.translationhandler import tr
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.ui.result import ResultType


class LabwcProfile(XorgProfile):
class LabwcProfile(Profile):
def __init__(self) -> None:
super().__init__(
'Labwc',
ProfileType.WindowMgr,
support_gfx_driver=True,
is_wayland=True,
)

self.custom_settings = {'seat_access': None}
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/lxqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'lxqt',
'breeze-icons',
'oxygen-icons',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/mate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'mate',
'mate-extra',
]
Expand Down
7 changes: 4 additions & 3 deletions archinstall/default_profiles/desktops/niri.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from typing import override

from archinstall.default_profiles.desktops import SeatAccess
from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType
from archinstall.lib.menu.helpers import Selection
from archinstall.lib.translationhandler import tr
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.ui.result import ResultType


class NiriProfile(XorgProfile):
class NiriProfile(Profile):
def __init__(self) -> None:
super().__init__(
'Niri',
ProfileType.WindowMgr,
support_gfx_driver=True,
is_wayland=True,
)

self.custom_settings = {'seat_access': None}
Expand Down
12 changes: 8 additions & 4 deletions archinstall/default_profiles/desktops/plasma.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from typing import override

from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType


class PlasmaProfile(XorgProfile):
class PlasmaProfile(Profile):
def __init__(self) -> None:
super().__init__('KDE Plasma', ProfileType.DesktopEnv)
super().__init__(
'KDE Plasma',
ProfileType.DesktopEnv,
support_gfx_driver=True,
is_wayland=True,
)

@property
@override
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/qtile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'qtile',
'alacritty',
]
Expand Down
12 changes: 8 additions & 4 deletions archinstall/default_profiles/desktops/river.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from typing import override

from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType


class RiverProfile(XorgProfile):
class RiverProfile(Profile):
def __init__(self) -> None:
super().__init__('River', ProfileType.WindowMgr)
super().__init__(
'River',
ProfileType.WindowMgr,
support_gfx_driver=True,
is_wayland=True,
)

@property
@override
Expand Down
7 changes: 4 additions & 3 deletions archinstall/default_profiles/desktops/sway.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from typing import override

from archinstall.default_profiles.desktops import SeatAccess
from archinstall.default_profiles.profile import GreeterType, ProfileType
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType
from archinstall.lib.menu.helpers import Selection
from archinstall.lib.translationhandler import tr
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.ui.result import ResultType


class SwayProfile(XorgProfile):
class SwayProfile(Profile):
def __init__(self) -> None:
super().__init__(
'Sway',
ProfileType.WindowMgr,
support_gfx_driver=True,
is_wayland=True,
)

self.custom_settings = {'seat_access': None}
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/xfce4.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'xfce4',
'xfce4-goodies',
'pavucontrol',
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/xmonad.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self) -> None:
@property
@override
def packages(self) -> list[str]:
return [
return super().packages + [
'xmonad',
'xmonad-contrib',
'xmonad-extras',
Expand Down
13 changes: 13 additions & 0 deletions archinstall/default_profiles/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ def __init__(
services: list[str] = [],
support_gfx_driver: bool = False,
support_greeter: bool = False,
is_wayland: bool = False,
) -> None:
self.name = name
self.profile_type = profile_type
self.custom_settings: dict[str, str | None] = {}

self._support_gfx_driver = support_gfx_driver
self._support_greeter = support_greeter
self._is_wayland = is_wayland

# self.gfx_driver: str | None = None

Expand Down Expand Up @@ -169,10 +171,21 @@ def is_graphic_driver_supported(self) -> bool:
def is_greeter_supported(self) -> bool:
return self._support_greeter

@property
def is_wayland(self) -> bool:
return self._is_wayland

def preview_text(self) -> str:
"""
Override this method to provide a preview text for the profile
"""
if self.is_desktop_type_profile():
display_type = 'Wayland' if self._is_wayland else 'Xorg'
text = tr('Environment type: {} {}').format(display_type, self.profile_type.value)
if packages := self.packages_text():
text += f'\n{packages}'
return text

return self.packages_text()

def packages_text(self, include_sub_packages: bool = False) -> str:
Expand Down
19 changes: 9 additions & 10 deletions archinstall/default_profiles/xorg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import override
from typing import TYPE_CHECKING, override

from archinstall.default_profiles.profile import Profile, ProfileType
from archinstall.lib.translationhandler import tr

if TYPE_CHECKING:
from archinstall.lib.installer import Installer


class XorgProfile(Profile):
Expand All @@ -16,17 +18,14 @@ def __init__(
support_gfx_driver=True,
)

@override
def preview_text(self) -> str:
text = tr('Environment type: {}').format(self.profile_type.value)
if packages := self.packages_text():
text += f'\n{packages}'

return text

@property
@override
def packages(self) -> list[str]:
return [
'xorg-server',
'xorg-xinit',
]

@override
def install(self, install_session: Installer) -> None:
install_session.add_additional_packages(self.packages)
4 changes: 1 addition & 3 deletions archinstall/lib/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class GfxPackage(Enum):
Xf86VideoAmdgpu = 'xf86-video-amdgpu'
Xf86VideoAti = 'xf86-video-ati'
Xf86VideoNouveau = 'xf86-video-nouveau'
XorgServer = 'xorg-server'
XorgXinit = 'xorg-xinit'


class GfxDriver(Enum):
Expand Down Expand Up @@ -80,7 +78,7 @@ def packages_text(self) -> str:
return text

def gfx_packages(self) -> list[GfxPackage]:
packages = [GfxPackage.XorgServer, GfxPackage.XorgXinit]
packages: list[GfxPackage] = []

match self:
case GfxDriver.AllOpenSource:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/profile/profiles_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def _find_available_profiles(self) -> list[Profile]:
profiles_path = Path(__file__).parents[2] / 'default_profiles'
profiles = []
for file in profiles_path.glob('**/*.py'):
# ignore the abstract default_profiles class
if 'profile.py' in file.name:
# ignore the abstract base classes
if file.name == 'profile.py':
continue
profiles += self._process_profile_file(file)

Expand Down
Loading