Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorSxmourai <49468969+Sxmourai@users.noreply.github.com>2023-09-22 11:46:59 +0200
committerGitHub <noreply@github.com>2023-09-22 11:46:59 +0200
commitd6e3a4651f2ff944a00e8acfb316db8be2fbcf3e (patch)
treed635e01b760045bf3a84f5148700b8fcf212edfe /archinstall
parent4f9e8d2381d9603f99d37fe38462a2f98d059d37 (diff)
Renamed hyperland to hyprland, fixed seatd via post_installation and added waybar-hyprland (#1824)
* Renamed hyperland to hyprland, fixed seatd via post_installation and installed waybar * Removed the launching of seatd on the installation process * Starting to add nvidia support, and automatic configuring of hyprland * Starting to add auto configuration of hyprland... But this will need maintenance * Added hyprpaper auto config Gonna make waybar auto config next * Waybar auto config is starting... I can't test rn I'm on vacation and my connection is quite bad (68 days for arch iso) * Added wlogout support (and swaylock) * Fixed file managers printing * Starting to add a shell config... Definitely don't push this * Reverted custom-shell config (create a separate PR) * Removed systemd-logind, as that was just for testing the selector * Added polkit as an option for the seat. As it's a dependency of the hyprland package * Flake8 fix * The name change wasn't propegated to the menu * Added newline at the end of general_conf.py to not alter it * Removed newline at the end of general_conf.py to not alter it * Renamed the Hyprland class --------- Co-authored-by: Anton Hvornum <anton@hvornum.se> Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/default_profiles/desktops/hyperland.py27
-rw-r--r--archinstall/default_profiles/desktops/hyprland.py62
-rw-r--r--archinstall/lib/interactions/general_conf.py2
3 files changed, 63 insertions, 28 deletions
diff --git a/archinstall/default_profiles/desktops/hyperland.py b/archinstall/default_profiles/desktops/hyperland.py
deleted file mode 100644
index 58ee8cca..00000000
--- a/archinstall/default_profiles/desktops/hyperland.py
+++ /dev/null
@@ -1,27 +0,0 @@
-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 HyperlandProfile(XorgProfile):
- def __init__(self):
- super().__init__('Hyperland', ProfileType.DesktopEnv, description='')
-
- @property
- def packages(self) -> List[str]:
- return [
- "hyprland",
- "dunst",
- "xdg-desktop-portal-hyprland",
- "kitty",
- "qt5-wayland",
- "qt6-wayland"
- ]
-
- @property
- def default_greeter_type(self) -> Optional[GreeterType]:
- return GreeterType.Sddm
diff --git a/archinstall/default_profiles/desktops/hyprland.py b/archinstall/default_profiles/desktops/hyprland.py
new file mode 100644
index 00000000..f464c828
--- /dev/null
+++ b/archinstall/default_profiles/desktops/hyprland.py
@@ -0,0 +1,62 @@
+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",
+ "xdg-desktop-portal-hyprland",
+ "qt5-wayland",
+ "qt6-wayland"
+ ]
+
+ @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/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py
index 8dd6e94f..56598e25 100644
--- a/archinstall/lib/interactions/general_conf.py
+++ b/archinstall/lib/interactions/general_conf.py
@@ -218,4 +218,4 @@ def select_additional_repositories(preset: List[str]) -> List[str]:
case MenuSelectionType.Reset: return []
case MenuSelectionType.Selection: return choice.single_value
- return []
+ return [] \ No newline at end of file