Start using typing.override to annotate overridden methods and properties (#2934)
This commit is contained in:
parent
8d807c08ee
commit
ee2ed3fe54
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
@ -13,6 +13,7 @@ class PipewireProfile(Profile):
|
||||||
super().__init__('Pipewire', ProfileType.Application)
|
super().__init__('Pipewire', ProfileType.Application)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'pipewire',
|
'pipewire',
|
||||||
|
|
@ -51,6 +52,7 @@ class PipewireProfile(Profile):
|
||||||
run_as=user.username
|
run_as=user.username
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
install_session.add_additional_packages(self.packages)
|
install_session.add_additional_packages(self.packages)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType, SelectResult
|
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType, SelectResult
|
||||||
from archinstall.lib.output import info
|
from archinstall.lib.output import info
|
||||||
|
|
@ -25,6 +25,7 @@ class DesktopProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'nano',
|
'nano',
|
||||||
|
|
@ -40,6 +41,7 @@ class DesktopProfile(Profile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
combined_greeters: dict[GreeterType, int] = {}
|
combined_greeters: dict[GreeterType, int] = {}
|
||||||
for profile in self.current_selection:
|
for profile in self.current_selection:
|
||||||
|
|
@ -56,6 +58,7 @@ class DesktopProfile(Profile):
|
||||||
for profile in self.current_selection:
|
for profile in self.current_selection:
|
||||||
profile.do_on_select()
|
profile.do_on_select()
|
||||||
|
|
||||||
|
@override
|
||||||
def do_on_select(self) -> SelectResult | None:
|
def do_on_select(self) -> SelectResult | None:
|
||||||
items = [
|
items = [
|
||||||
MenuItem(
|
MenuItem(
|
||||||
|
|
@ -88,10 +91,12 @@ class DesktopProfile(Profile):
|
||||||
case ResultType.Reset:
|
case ResultType.Reset:
|
||||||
return SelectResult.ResetCurrent
|
return SelectResult.ResetCurrent
|
||||||
|
|
||||||
|
@override
|
||||||
def post_install(self, install_session: 'Installer') -> None:
|
def post_install(self, install_session: 'Installer') -> None:
|
||||||
for profile in self.current_selection:
|
for profile in self.current_selection:
|
||||||
profile.post_install(install_session)
|
profile.post_install(install_session)
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
# Install common packages for all desktop environments
|
# Install common packages for all desktop environments
|
||||||
install_session.add_additional_packages(self.packages)
|
install_session.add_additional_packages(self.packages)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import ProfileType
|
from archinstall.default_profiles.profile import ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
@ -12,6 +12,7 @@ class AwesomeProfile(XorgProfile):
|
||||||
super().__init__('Awesome', ProfileType.WindowMgr, description='')
|
super().__init__('Awesome', ProfileType.WindowMgr, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return super().packages + [
|
return super().packages + [
|
||||||
'awesome',
|
'awesome',
|
||||||
|
|
@ -27,6 +28,7 @@ class AwesomeProfile(XorgProfile):
|
||||||
'xsel',
|
'xsel',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class BspwmProfile(XorgProfile):
|
||||||
super().__init__('Bspwm', ProfileType.WindowMgr, description='')
|
super().__init__('Bspwm', ProfileType.WindowMgr, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
# return super().packages + [
|
# return super().packages + [
|
||||||
return [
|
return [
|
||||||
|
|
@ -18,5 +21,6 @@ class BspwmProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class BudgieProfile(XorgProfile):
|
||||||
super().__init__('Budgie', ProfileType.DesktopEnv, description='')
|
super().__init__('Budgie', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"arc-gtk-theme",
|
"arc-gtk-theme",
|
||||||
|
|
@ -17,5 +20,6 @@ class BudgieProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.LightdmSlick
|
return GreeterType.LightdmSlick
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class CinnamonProfile(XorgProfile):
|
||||||
super().__init__('Cinnamon', ProfileType.DesktopEnv, description='')
|
super().__init__('Cinnamon', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"cinnamon",
|
"cinnamon",
|
||||||
|
|
@ -23,5 +26,6 @@ class CinnamonProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,11 +9,13 @@ class CosmicProfile(XorgProfile):
|
||||||
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, description='', advanced=True)
|
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, description='', advanced=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"cosmic",
|
"cosmic",
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.CosmicSession
|
return GreeterType.CosmicSession
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
@ -12,6 +12,7 @@ class CutefishProfile(XorgProfile):
|
||||||
super().__init__('Cutefish', ProfileType.DesktopEnv, description='')
|
super().__init__('Cutefish', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"cutefish",
|
"cutefish",
|
||||||
|
|
@ -19,8 +20,10 @@ class CutefishProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Sddm
|
return GreeterType.Sddm
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class DeepinProfile(XorgProfile):
|
||||||
super().__init__('Deepin', ProfileType.DesktopEnv, description='')
|
super().__init__('Deepin', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"deepin",
|
"deepin",
|
||||||
|
|
@ -15,5 +18,6 @@ class DeepinProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class EnlighenmentProfile(XorgProfile):
|
||||||
super().__init__('Enlightenment', ProfileType.WindowMgr, description='')
|
super().__init__('Enlightenment', ProfileType.WindowMgr, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"enlightenment",
|
"enlightenment",
|
||||||
|
|
@ -14,5 +17,6 @@ class EnlighenmentProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class GnomeProfile(XorgProfile):
|
||||||
super().__init__('Gnome', ProfileType.DesktopEnv, description='')
|
super().__init__('Gnome', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'gnome',
|
'gnome',
|
||||||
|
|
@ -14,5 +17,6 @@ class GnomeProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Gdm
|
return GreeterType.Gdm
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.desktops import SeatAccess
|
from archinstall.default_profiles.desktops import SeatAccess
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType, SelectResult
|
from archinstall.default_profiles.profile import GreeterType, ProfileType, SelectResult
|
||||||
|
|
@ -21,6 +21,7 @@ class HyprlandProfile(XorgProfile):
|
||||||
self.custom_settings = {'seat_access': None}
|
self.custom_settings = {'seat_access': None}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"hyprland",
|
"hyprland",
|
||||||
|
|
@ -37,10 +38,12 @@ class HyprlandProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Sddm
|
return GreeterType.Sddm
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
if pref := self.custom_settings.get('seat_access', None):
|
if pref := self.custom_settings.get('seat_access', None):
|
||||||
return [pref]
|
return [pref]
|
||||||
|
|
@ -69,9 +72,11 @@ class HyprlandProfile(XorgProfile):
|
||||||
if result.item() is not None:
|
if result.item() is not None:
|
||||||
self.custom_settings['seat_access'] = result.get_value().value
|
self.custom_settings['seat_access'] = result.get_value().value
|
||||||
|
|
||||||
|
@override
|
||||||
def do_on_select(self) -> SelectResult | None:
|
def do_on_select(self) -> SelectResult | None:
|
||||||
self._ask_seat_access()
|
self._ask_seat_access()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class I3wmProfile(XorgProfile):
|
||||||
super().__init__('i3-wm', ProfileType.WindowMgr, description='')
|
super().__init__('i3-wm', ProfileType.WindowMgr, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'i3-wm',
|
'i3-wm',
|
||||||
|
|
@ -21,5 +24,6 @@ class I3wmProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -10,6 +12,7 @@ class LxqtProfile(XorgProfile):
|
||||||
# LXQt works with lightdm, but since this is not supported, we will not default to this.
|
# LXQt works with lightdm, but since this is not supported, we will not default to this.
|
||||||
# https://github.com/lxqt/lxqt/issues/795
|
# https://github.com/lxqt/lxqt/issues/795
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"lxqt",
|
"lxqt",
|
||||||
|
|
@ -22,5 +25,6 @@ class LxqtProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Sddm
|
return GreeterType.Sddm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class MateProfile(XorgProfile):
|
||||||
super().__init__('Mate', ProfileType.DesktopEnv, description='')
|
super().__init__('Mate', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"mate",
|
"mate",
|
||||||
|
|
@ -14,5 +17,6 @@ class MateProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class PlasmaProfile(XorgProfile):
|
||||||
super().__init__('KDE Plasma', ProfileType.DesktopEnv, description='')
|
super().__init__('KDE Plasma', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"plasma-meta",
|
"plasma-meta",
|
||||||
|
|
@ -19,5 +22,6 @@ class PlasmaProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Sddm
|
return GreeterType.Sddm
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class QtileProfile(XorgProfile):
|
||||||
super().__init__('Qtile', ProfileType.WindowMgr, description='')
|
super().__init__('Qtile', ProfileType.WindowMgr, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'qtile',
|
'qtile',
|
||||||
|
|
@ -14,5 +17,6 @@ class QtileProfile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.desktops import SeatAccess
|
from archinstall.default_profiles.desktops import SeatAccess
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType, SelectResult
|
from archinstall.default_profiles.profile import GreeterType, ProfileType, SelectResult
|
||||||
|
|
@ -25,6 +25,7 @@ class SwayProfile(XorgProfile):
|
||||||
self.custom_settings = {'seat_access': None}
|
self.custom_settings = {'seat_access': None}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
additional = []
|
additional = []
|
||||||
if seat := self.custom_settings.get('seat_access', None):
|
if seat := self.custom_settings.get('seat_access', None):
|
||||||
|
|
@ -46,10 +47,12 @@ class SwayProfile(XorgProfile):
|
||||||
] + additional
|
] + additional
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
if pref := self.custom_settings.get('seat_access', None):
|
if pref := self.custom_settings.get('seat_access', None):
|
||||||
return [pref]
|
return [pref]
|
||||||
|
|
@ -78,9 +81,11 @@ class SwayProfile(XorgProfile):
|
||||||
if result.item() is not None:
|
if result.item() is not None:
|
||||||
self.custom_settings['seat_access'] = result.get_value().value
|
self.custom_settings['seat_access'] = result.get_value().value
|
||||||
|
|
||||||
|
@override
|
||||||
def do_on_select(self) -> SelectResult | None:
|
def do_on_select(self) -> SelectResult | None:
|
||||||
self._ask_seat_access()
|
self._ask_seat_access()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
|
|
@ -7,6 +9,7 @@ class Xfce4Profile(XorgProfile):
|
||||||
super().__init__('Xfce4', ProfileType.DesktopEnv, description='')
|
super().__init__('Xfce4', ProfileType.DesktopEnv, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
"xfce4",
|
"xfce4",
|
||||||
|
|
@ -17,5 +20,6 @@ class Xfce4Profile(XorgProfile):
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType | None:
|
def default_greeter_type(self) -> GreeterType | None:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType, SelectResult
|
from archinstall.default_profiles.profile import Profile, ProfileType, SelectResult
|
||||||
from archinstall.lib.output import info
|
from archinstall.lib.output import info
|
||||||
|
|
@ -23,6 +23,7 @@ class ServerProfile(Profile):
|
||||||
current_selection=current_value
|
current_selection=current_value
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@override
|
||||||
def do_on_select(self) -> SelectResult | None:
|
def do_on_select(self) -> SelectResult | None:
|
||||||
items = [
|
items = [
|
||||||
MenuItem(
|
MenuItem(
|
||||||
|
|
@ -55,10 +56,12 @@ class ServerProfile(Profile):
|
||||||
case ResultType.Reset:
|
case ResultType.Reset:
|
||||||
return SelectResult.ResetCurrent
|
return SelectResult.ResetCurrent
|
||||||
|
|
||||||
|
@override
|
||||||
def post_install(self, install_session: 'Installer') -> None:
|
def post_install(self, install_session: 'Installer') -> None:
|
||||||
for profile in self.current_selection:
|
for profile in self.current_selection:
|
||||||
profile.post_install(install_session)
|
profile.post_install(install_session)
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
server_info = self.current_selection_names()
|
server_info = self.current_selection_names()
|
||||||
details = ', '.join(server_info)
|
details = ', '.join(server_info)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class CockpitProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['cockpit', 'udisks2', 'packagekit']
|
return ['cockpit', 'udisks2', 'packagekit']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['cockpit.socket']
|
return ['cockpit.socket']
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
@ -16,13 +16,16 @@ class DockerProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['docker']
|
return ['docker']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['docker']
|
return ['docker']
|
||||||
|
|
||||||
|
@override
|
||||||
def post_install(self, install_session: 'Installer') -> None:
|
def post_install(self, install_session: 'Installer') -> None:
|
||||||
users: User | list[User] = archinstall.arguments.get('!users', [])
|
users: User | list[User] = archinstall.arguments.get('!users', [])
|
||||||
if not isinstance(users, list):
|
if not isinstance(users, list):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class HttpdProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['apache']
|
return ['apache']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['httpd']
|
return ['httpd']
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class LighttpdProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['lighttpd']
|
return ['lighttpd']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['lighttpd']
|
return ['lighttpd']
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
@ -14,12 +14,15 @@ class MariadbProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['mariadb']
|
return ['mariadb']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['mariadb']
|
return ['mariadb']
|
||||||
|
|
||||||
|
@override
|
||||||
def post_install(self, install_session: 'Installer') -> None:
|
def post_install(self, install_session: 'Installer') -> None:
|
||||||
install_session.arch_chroot('mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql')
|
install_session.arch_chroot('mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql')
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class NginxProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['nginx']
|
return ['nginx']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['nginx']
|
return ['nginx']
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
@ -15,12 +15,15 @@ class PostgresqlProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['postgresql']
|
return ['postgresql']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['postgresql']
|
return ['postgresql']
|
||||||
|
|
||||||
|
@override
|
||||||
def post_install(self, install_session: 'Installer') -> None:
|
def post_install(self, install_session: 'Installer') -> None:
|
||||||
install_session.arch_chroot("initdb -D /var/lib/postgres/data", run_as='postgres')
|
install_session.arch_chroot("initdb -D /var/lib/postgres/data", run_as='postgres')
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class SshdProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['openssh']
|
return ['openssh']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['sshd']
|
return ['sshd']
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +11,11 @@ class TomcatProfile(Profile):
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['tomcat10']
|
return ['tomcat10']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def services(self) -> list[str]:
|
def services(self) -> list[str]:
|
||||||
return ['tomcat10']
|
return ['tomcat10']
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import ProfileType
|
from archinstall.default_profiles.profile import ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
@ -12,9 +12,11 @@ class TailoredProfile(XorgProfile):
|
||||||
super().__init__('52-54-00-12-34-56', ProfileType.Tailored, description='')
|
super().__init__('52-54-00-12-34-56', ProfileType.Tailored, description='')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return ['nano', 'wget', 'git']
|
return ['nano', 'wget', 'git']
|
||||||
|
|
||||||
|
@override
|
||||||
def install(self, install_session: 'Installer') -> None:
|
def install(self, install_session: 'Installer') -> None:
|
||||||
super().install(install_session)
|
super().install(install_session)
|
||||||
# do whatever you like here :)
|
# do whatever you like here :)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
||||||
|
|
@ -26,6 +26,7 @@ class XorgProfile(Profile):
|
||||||
advanced=advanced
|
advanced=advanced
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@override
|
||||||
def preview_text(self) -> str | None:
|
def preview_text(self) -> str | None:
|
||||||
text = str(_('Environment type: {}')).format(self.profile_type.value)
|
text = str(_('Environment type: {}')).format(self.profile_type.value)
|
||||||
if packages := self.packages_text():
|
if packages := self.packages_text():
|
||||||
|
|
@ -34,6 +35,7 @@ class XorgProfile(Profile):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@override
|
||||||
def packages(self) -> list[str]:
|
def packages(self) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'xorg-server'
|
'xorg-server'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, override
|
||||||
|
|
||||||
from archinstall.tui import MenuItem, MenuItemGroup
|
from archinstall.tui import MenuItem, MenuItemGroup
|
||||||
|
|
||||||
|
|
@ -52,6 +52,7 @@ class DiskLayoutConfigurationMenu(AbstractSubMenu):
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@override
|
||||||
def run(self) -> DiskLayoutConfiguration | None:
|
def run(self) -> DiskLayoutConfiguration | None:
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, override
|
||||||
|
|
||||||
from archinstall.lib.menu.menu_helper import MenuHelper
|
from archinstall.lib.menu.menu_helper import MenuHelper
|
||||||
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
||||||
|
|
@ -104,6 +104,7 @@ class DiskEncryptionMenu(AbstractSubMenu):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@override
|
||||||
def run(self) -> DiskEncryption | None:
|
def run(self) -> DiskEncryption | None:
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
||||||
import re
|
import re
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
||||||
|
|
||||||
|
|
@ -60,12 +60,14 @@ class PartitioningList(ListManager):
|
||||||
display_actions = list(self._actions.values())
|
display_actions = list(self._actions.values())
|
||||||
super().__init__(prompt, device_partitions, display_actions[:2], display_actions[3:])
|
super().__init__(prompt, device_partitions, display_actions[:2], display_actions[3:])
|
||||||
|
|
||||||
|
@override
|
||||||
def selected_action_display(self, selection: PartitionModification) -> str:
|
def selected_action_display(self, selection: PartitionModification) -> str:
|
||||||
if selection.status == ModificationStatus.Create:
|
if selection.status == ModificationStatus.Create:
|
||||||
return str(_('Partition - New'))
|
return str(_('Partition - New'))
|
||||||
else:
|
else:
|
||||||
return str(selection.dev_path)
|
return str(selection.dev_path)
|
||||||
|
|
||||||
|
@override
|
||||||
def filter_options(self, selection: PartitionModification, options: list[str]) -> list[str]:
|
def filter_options(self, selection: PartitionModification, options: list[str]) -> list[str]:
|
||||||
not_filter = []
|
not_filter = []
|
||||||
|
|
||||||
|
|
@ -98,6 +100,7 @@ class PartitioningList(ListManager):
|
||||||
|
|
||||||
return [o for o in options if o not in not_filter]
|
return [o for o in options if o not in not_filter]
|
||||||
|
|
||||||
|
@override
|
||||||
def handle_action(
|
def handle_action(
|
||||||
self,
|
self,
|
||||||
action: str,
|
action: str,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, EditMenu, ResultType
|
from archinstall.tui import Alignment, EditMenu, ResultType
|
||||||
|
|
||||||
|
|
@ -24,6 +24,7 @@ class SubvolumeMenu(ListManager):
|
||||||
]
|
]
|
||||||
super().__init__(prompt, btrfs_subvols, [self._actions[0]], self._actions[1:])
|
super().__init__(prompt, btrfs_subvols, [self._actions[0]], self._actions[1:])
|
||||||
|
|
||||||
|
@override
|
||||||
def selected_action_display(self, selection: SubvolumeModification) -> str:
|
def selected_action_display(self, selection: SubvolumeModification) -> str:
|
||||||
return str(selection.name)
|
return str(selection.name)
|
||||||
|
|
||||||
|
|
@ -56,6 +57,7 @@ class SubvolumeMenu(ListManager):
|
||||||
|
|
||||||
return SubvolumeModification(Path(name), path)
|
return SubvolumeModification(Path(name), path)
|
||||||
|
|
||||||
|
@override
|
||||||
def handle_action(
|
def handle_action(
|
||||||
self,
|
self,
|
||||||
action: str,
|
action: str,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, EditMenu, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
from archinstall.tui import Alignment, EditMenu, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
||||||
|
|
||||||
|
|
@ -28,9 +28,11 @@ class UserList(ListManager):
|
||||||
]
|
]
|
||||||
super().__init__(prompt, lusers, [self._actions[0]], self._actions[1:])
|
super().__init__(prompt, lusers, [self._actions[0]], self._actions[1:])
|
||||||
|
|
||||||
|
@override
|
||||||
def selected_action_display(self, selection: User) -> str:
|
def selected_action_display(self, selection: User) -> str:
|
||||||
return selection.username
|
return selection.username
|
||||||
|
|
||||||
|
@override
|
||||||
def handle_action(self, action: str, entry: User | None, data: list[User]) -> list[User]:
|
def handle_action(self, action: str, entry: User | None, data: list[User]) -> list[User]:
|
||||||
if action == self._actions[0]: # add
|
if action == self._actions[0]: # add
|
||||||
new_user = self._add_user()
|
new_user = self._add_user()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import ipaddress
|
import ipaddress
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
||||||
|
|
||||||
|
|
@ -26,9 +26,11 @@ class ManualNetworkConfig(ListManager):
|
||||||
]
|
]
|
||||||
super().__init__(prompt, preset, [self._actions[0]], self._actions[1:])
|
super().__init__(prompt, preset, [self._actions[0]], self._actions[1:])
|
||||||
|
|
||||||
|
@override
|
||||||
def selected_action_display(self, selection: Nic) -> str:
|
def selected_action_display(self, selection: Nic) -> str:
|
||||||
return selection.iface if selection.iface else ''
|
return selection.iface if selection.iface else ''
|
||||||
|
|
||||||
|
@override
|
||||||
def handle_action(self, action: str, entry: Nic | None, data: list[Nic]) -> list[Nic]:
|
def handle_action(self, action: str, entry: Nic | None, data: list[Nic]) -> list[Nic]:
|
||||||
if action == self._actions[0]: # add
|
if action == self._actions[0]: # add
|
||||||
iface = self._select_iface(data)
|
iface = self._select_iface(data)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
||||||
|
|
||||||
|
|
@ -108,6 +108,7 @@ class LocaleMenu(AbstractSubMenu):
|
||||||
)
|
)
|
||||||
return temp_locale.preview()
|
return temp_locale.preview()
|
||||||
|
|
||||||
|
@override
|
||||||
def run(self) -> LocaleConfiguration:
|
def run(self) -> LocaleConfiguration:
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import urllib.parse
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, override
|
||||||
|
|
||||||
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
from archinstall.tui import Alignment, EditMenu, FrameProperties, MenuItem, MenuItemGroup, ResultType, SelectMenu
|
||||||
|
|
||||||
|
|
@ -136,9 +136,11 @@ class CustomMirrorList(ListManager):
|
||||||
self._actions[1:]
|
self._actions[1:]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@override
|
||||||
def selected_action_display(self, selection: CustomMirror) -> str:
|
def selected_action_display(self, selection: CustomMirror) -> str:
|
||||||
return selection.name
|
return selection.name
|
||||||
|
|
||||||
|
@override
|
||||||
def handle_action(
|
def handle_action(
|
||||||
self,
|
self,
|
||||||
action: str,
|
action: str,
|
||||||
|
|
@ -299,6 +301,7 @@ class MirrorMenu(AbstractSubMenu):
|
||||||
output = FormattedOutput.as_table(custom_mirrors)
|
output = FormattedOutput.as_table(custom_mirrors)
|
||||||
return output.strip()
|
return output.strip()
|
||||||
|
|
||||||
|
@override
|
||||||
def run(self) -> MirrorConfiguration:
|
def run(self) -> MirrorConfiguration:
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, Profile
|
from archinstall.default_profiles.profile import GreeterType, Profile
|
||||||
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
from archinstall.tui import Alignment, FrameProperties, MenuItem, MenuItemGroup, Orientation, ResultType, SelectMenu
|
||||||
|
|
@ -64,6 +64,7 @@ class ProfileMenu(AbstractSubMenu):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@override
|
||||||
def run(self) -> ProfileConfiguration | None:
|
def run(self) -> ProfileConfiguration | None:
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from collections.abc import Callable
|
||||||
from curses.textpad import Textbox
|
from curses.textpad import Textbox
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from types import FrameType, TracebackType
|
from types import FrameType, TracebackType
|
||||||
from typing import TYPE_CHECKING, Any, Literal
|
from typing import TYPE_CHECKING, Any, Literal, override
|
||||||
|
|
||||||
from ..lib.output import debug
|
from ..lib.output import debug
|
||||||
from .help import Help
|
from .help import Help
|
||||||
|
|
@ -684,6 +684,7 @@ class EditMenu(AbstractCurses):
|
||||||
self._clear_all()
|
self._clear_all()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@override
|
||||||
def resize_win(self) -> None:
|
def resize_win(self) -> None:
|
||||||
self._draw()
|
self._draw()
|
||||||
|
|
||||||
|
|
@ -726,6 +727,7 @@ class EditMenu(AbstractCurses):
|
||||||
self._input_vp.update()
|
self._input_vp.update()
|
||||||
self._input_vp.edit(default_text=self._default_text)
|
self._input_vp.edit(default_text=self._default_text)
|
||||||
|
|
||||||
|
@override
|
||||||
def kickoff(self, win: 'curses._CursesWindow') -> Result:
|
def kickoff(self, win: 'curses._CursesWindow') -> Result:
|
||||||
try:
|
try:
|
||||||
self._draw()
|
self._draw()
|
||||||
|
|
@ -889,6 +891,7 @@ class SelectMenu(AbstractCurses):
|
||||||
self._clear_all()
|
self._clear_all()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@override
|
||||||
def kickoff(self, win: 'curses._CursesWindow') -> Result:
|
def kickoff(self, win: 'curses._CursesWindow') -> Result:
|
||||||
self._draw()
|
self._draw()
|
||||||
|
|
||||||
|
|
@ -909,6 +912,7 @@ class SelectMenu(AbstractCurses):
|
||||||
else:
|
else:
|
||||||
return self.kickoff(win)
|
return self.kickoff(win)
|
||||||
|
|
||||||
|
@override
|
||||||
def resize_win(self) -> None:
|
def resize_win(self) -> None:
|
||||||
self._draw()
|
self._draw()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue