diff --git a/archinstall/default_profiles/desktop.py b/archinstall/default_profiles/desktop.py index 7ffe31a8b0..17d38c6123 100644 --- a/archinstall/default_profiles/desktop.py +++ b/archinstall/default_profiles/desktop.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: from archinstall.lib.installer import Installer + from archinstall.lib.models.users import User class DesktopProfile(Profile): @@ -88,6 +89,11 @@ def post_install(self, install_session: Installer) -> None: for profile in self.current_selection: 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 def install(self, install_session: Installer) -> None: # Install common packages for all desktop environments diff --git a/archinstall/default_profiles/desktops/bspwm.py b/archinstall/default_profiles/desktops/bspwm.py index f8c2a7b238..8886298a4a 100644 --- a/archinstall/default_profiles/desktops/bspwm.py +++ b/archinstall/default_profiles/desktops/bspwm.py @@ -1,6 +1,8 @@ from typing import override 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): @@ -27,3 +29,11 @@ def packages(self) -> list[str]: @override def default_greeter_type(self) -> GreeterType: 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)