Fix bspwm black screen: add provision() delegation and default configs (#4518)
* Fix bspwm black screen: add provision() delegation and default configs * Move TYPE_CHECKING imports to top level in bspwm profile
This commit is contained in:
parent
ef1cfe7b56
commit
b0b7983af2
|
|
@ -9,6 +9,7 @@ from archinstall.tui.result import ResultType
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from archinstall.lib.installer import Installer
|
from archinstall.lib.installer import Installer
|
||||||
|
from archinstall.lib.models.users import User
|
||||||
|
|
||||||
|
|
||||||
class DesktopProfile(Profile):
|
class DesktopProfile(Profile):
|
||||||
|
|
@ -88,6 +89,11 @@ class DesktopProfile(Profile):
|
||||||
for profile in self.current_selection:
|
for profile in self.current_selection:
|
||||||
profile.post_install(install_session)
|
profile.post_install(install_session)
|
||||||
|
|
||||||
|
@override
|
||||||
|
def provision(self, install_session: Installer, users: list[User]) -> None:
|
||||||
|
for profile in self.current_selection:
|
||||||
|
profile.provision(install_session, users)
|
||||||
|
|
||||||
@override
|
@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
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
from typing import override
|
from typing import override
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import DisplayServerType, GreeterType, Profile, ProfileType
|
from archinstall.default_profiles.profile import DisplayServerType, GreeterType, Profile, ProfileType
|
||||||
|
from archinstall.lib.installer import Installer
|
||||||
|
from archinstall.lib.models.users import User
|
||||||
|
|
||||||
|
|
||||||
class BspwmProfile(Profile):
|
class BspwmProfile(Profile):
|
||||||
|
|
@ -27,3 +29,11 @@ class BspwmProfile(Profile):
|
||||||
@override
|
@override
|
||||||
def default_greeter_type(self) -> GreeterType:
|
def default_greeter_type(self) -> GreeterType:
|
||||||
return GreeterType.Lightdm
|
return GreeterType.Lightdm
|
||||||
|
|
||||||
|
@override
|
||||||
|
def provision(self, install_session: Installer, users: list[User]) -> None:
|
||||||
|
for user in users:
|
||||||
|
install_session.arch_chroot('mkdir -p ~/.config/bspwm ~/.config/sxhkd', run_as=user.username)
|
||||||
|
install_session.arch_chroot('cp /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/', run_as=user.username)
|
||||||
|
install_session.arch_chroot('cp /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/', run_as=user.username)
|
||||||
|
install_session.arch_chroot('chmod +x ~/.config/bspwm/bspwmrc', run_as=user.username)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue