Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed hyperland to hyprland, fixed seatd via post_installation and added waybar-hyprland #1824

Merged
merged 18 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
27 changes: 0 additions & 27 deletions archinstall/default_profiles/desktops/hyperland.py

This file was deleted.

63 changes: 63 additions & 0 deletions archinstall/default_profiles/desktops/hyprland.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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 HyperlandProfile(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",
"kitty",
"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)
2 changes: 1 addition & 1 deletion archinstall/lib/interactions/general_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []