Skip to content

Commit 7edd317

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

13 files changed

Lines changed: 52 additions & 22 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',

archinstall/default_profiles/profile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ProfileType(Enum):
1515
Server = 'Server'
1616
Desktop = 'Desktop'
1717
Xorg = 'Xorg'
18+
Wayland = 'Wayland'
1819
Minimal = 'Minimal'
1920
Custom = 'Custom'
2021
# detailed selection default_profiles
@@ -140,7 +141,7 @@ def reset(self) -> None:
140141
self.current_selection = []
141142

142143
def is_top_level_profile(self) -> bool:
143-
top_levels = [ProfileType.Desktop, ProfileType.Server, ProfileType.Xorg, ProfileType.Minimal, ProfileType.Custom]
144+
top_levels = [ProfileType.Desktop, ProfileType.Server, ProfileType.Xorg, ProfileType.Wayland, ProfileType.Minimal, ProfileType.Custom]
144145
return self.profile_type in top_levels
145146

146147
def is_desktop_profile(self) -> bool:
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.Wayland,
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 []

0 commit comments

Comments
 (0)