Skip to content

Commit 4540650

Browse files
committed
Add WaylandProfile to avoid installing xorg packages for Wayland compositors
1 parent 0175949 commit 4540650

11 files changed

Lines changed: 48 additions & 19 deletions

File tree

archinstall/default_profiles/desktops/cosmic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import override
22

33
from archinstall.default_profiles.profile import GreeterType, ProfileType
4-
from archinstall.default_profiles.xorg import XorgProfile
4+
from archinstall.default_profiles.wayland import WaylandProfile
55

66

7-
class CosmicProfile(XorgProfile):
7+
class CosmicProfile(WaylandProfile):
88
def __init__(self) -> None:
99
super().__init__('Cosmic', ProfileType.DesktopEnv)
1010

archinstall/default_profiles/desktops/gnome.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import override
22

33
from archinstall.default_profiles.profile import GreeterType, ProfileType
4-
from archinstall.default_profiles.xorg import XorgProfile
4+
from archinstall.default_profiles.wayland import WaylandProfile
55

66

7-
class GnomeProfile(XorgProfile):
7+
class GnomeProfile(WaylandProfile):
88
def __init__(self) -> None:
99
super().__init__('GNOME', ProfileType.DesktopEnv)
1010

archinstall/default_profiles/desktops/hyprland.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from archinstall.default_profiles.desktops import SeatAccess
44
from archinstall.default_profiles.profile import GreeterType, ProfileType
5-
from archinstall.default_profiles.xorg import XorgProfile
5+
from archinstall.default_profiles.wayland import WaylandProfile
66
from archinstall.lib.menu.helpers import Selection
77
from archinstall.lib.translationhandler import tr
88
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
99
from archinstall.tui.ui.result import ResultType
1010

1111

12-
class HyprlandProfile(XorgProfile):
12+
class HyprlandProfile(WaylandProfile):
1313
def __init__(self) -> None:
1414
super().__init__('Hyprland', ProfileType.DesktopEnv)
1515

archinstall/default_profiles/desktops/labwc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from archinstall.default_profiles.desktops import SeatAccess
44
from archinstall.default_profiles.profile import GreeterType, ProfileType
5-
from archinstall.default_profiles.xorg import XorgProfile
5+
from archinstall.default_profiles.wayland import WaylandProfile
66
from archinstall.lib.menu.helpers import Selection
77
from archinstall.lib.translationhandler import tr
88
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
99
from archinstall.tui.ui.result import ResultType
1010

1111

12-
class LabwcProfile(XorgProfile):
12+
class LabwcProfile(WaylandProfile):
1313
def __init__(self) -> None:
1414
super().__init__(
1515
'Labwc',

archinstall/default_profiles/desktops/niri.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from archinstall.default_profiles.desktops import SeatAccess
44
from archinstall.default_profiles.profile import GreeterType, ProfileType
5-
from archinstall.default_profiles.xorg import XorgProfile
5+
from archinstall.default_profiles.wayland import WaylandProfile
66
from archinstall.lib.menu.helpers import Selection
77
from archinstall.lib.translationhandler import tr
88
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
99
from archinstall.tui.ui.result import ResultType
1010

1111

12-
class NiriProfile(XorgProfile):
12+
class NiriProfile(WaylandProfile):
1313
def __init__(self) -> None:
1414
super().__init__(
1515
'Niri',

archinstall/default_profiles/desktops/plasma.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import override
22

33
from archinstall.default_profiles.profile import GreeterType, ProfileType
4-
from archinstall.default_profiles.xorg import XorgProfile
4+
from archinstall.default_profiles.wayland import WaylandProfile
55

66

7-
class PlasmaProfile(XorgProfile):
7+
class PlasmaProfile(WaylandProfile):
88
def __init__(self) -> None:
99
super().__init__('KDE Plasma', ProfileType.DesktopEnv)
1010

archinstall/default_profiles/desktops/river.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import override
22

33
from archinstall.default_profiles.profile import GreeterType, ProfileType
4-
from archinstall.default_profiles.xorg import XorgProfile
4+
from archinstall.default_profiles.wayland import WaylandProfile
55

66

7-
class RiverProfile(XorgProfile):
7+
class RiverProfile(WaylandProfile):
88
def __init__(self) -> None:
99
super().__init__('River', ProfileType.WindowMgr)
1010

archinstall/default_profiles/desktops/sway.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from archinstall.default_profiles.desktops import SeatAccess
44
from archinstall.default_profiles.profile import GreeterType, ProfileType
5-
from archinstall.default_profiles.xorg import XorgProfile
5+
from archinstall.default_profiles.wayland import WaylandProfile
66
from archinstall.lib.menu.helpers import Selection
77
from archinstall.lib.translationhandler import tr
88
from archinstall.tui.ui.menu_item import MenuItem, MenuItemGroup
99
from archinstall.tui.ui.result import ResultType
1010

1111

12-
class SwayProfile(XorgProfile):
12+
class SwayProfile(WaylandProfile):
1313
def __init__(self) -> None:
1414
super().__init__(
1515
'Sway',
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from typing import override
2+
3+
from archinstall.default_profiles.profile import Profile, ProfileType
4+
from archinstall.lib.translationhandler import tr
5+
6+
7+
class WaylandProfile(Profile):
8+
def __init__(
9+
self,
10+
name: str = 'Wayland',
11+
profile_type: ProfileType = ProfileType.Xorg,
12+
):
13+
super().__init__(
14+
name,
15+
profile_type,
16+
support_gfx_driver=True,
17+
)
18+
19+
@override
20+
def preview_text(self) -> str:
21+
text = tr('Environment type: {}').format(self.profile_type.value)
22+
if packages := self.packages_text():
23+
text += f'\n{packages}'
24+
25+
return text
26+
27+
@property
28+
@override
29+
def packages(self) -> list[str]:
30+
return []

archinstall/default_profiles/xorg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ def preview_text(self) -> str:
2929
def packages(self) -> list[str]:
3030
return [
3131
'xorg-server',
32+
'xorg-xinit',
3233
]

0 commit comments

Comments
 (0)