index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | profiles/i3.py | 32 |
diff --git a/profiles/i3.py b/profiles/i3.py index 24956209..37029a02 100644 --- a/profiles/i3.py +++ b/profiles/i3.py @@ -1,6 +1,8 @@ # Common package for i3, lets user select which i3 configuration they want. import archinstall +from archinstall import Menu +from archinstall.lib.menu.menu import MenuSelectionType is_top_level_profile = False @@ -27,20 +29,26 @@ def _prep_function(*args, **kwargs): supported_configurations = ['i3-wm', 'i3-gaps'] - desktop = archinstall.Menu('Select your desired configuration', supported_configurations, skip=False).run() + choice = Menu('Select your desired configuration', supported_configurations).run() - # Temporarily store the selected desktop profile - # in a session-safe location, since this module will get reloaded - # the next time it gets executed. - archinstall.storage['_i3_configuration'] = desktop + if choice.type_ != MenuSelectionType.Selection: + return False - # i3 requires a functioning Xorg installation. - profile = archinstall.Profile(None, 'xorg') - with profile.load_instructions(namespace='xorg.py') as imported: - if hasattr(imported, '_prep_function'): - return imported._prep_function() - else: - print('Deprecated (??): xorg profile has no _prep_function() anymore') + if choice.value: + # Temporarily store the selected desktop profile + # in a session-safe location, since this module will get reloaded + # the next time it gets executed. + archinstall.storage['_i3_configuration'] = choice.value + + # i3 requires a functioning Xorg installation. + profile = archinstall.Profile(None, 'xorg') + with profile.load_instructions(namespace='xorg.py') as imported: + if hasattr(imported, '_prep_function'): + return imported._prep_function() + else: + print('Deprecated (??): xorg profile has no _prep_function() anymore') + + return False if __name__ == 'i3': |