This might work to make the i3 profiles as small as possible
This commit is contained in:
parent
7e161d187c
commit
82c5241946
|
|
@ -9,14 +9,7 @@ def _prep_function(*args, **kwargs):
|
||||||
other code in this stage. So it's a safe way to ask the user
|
other code in this stage. So it's a safe way to ask the user
|
||||||
for more input before any other installer steps start.
|
for more input before any other installer steps start.
|
||||||
"""
|
"""
|
||||||
|
return True
|
||||||
# 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 __name__ == 'i3-gaps':
|
if __name__ == 'i3-gaps':
|
||||||
# install the i3 group now
|
# install the i3 group now
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,7 @@ def _prep_function(*args, **kwargs):
|
||||||
other code in this stage. So it's a safe way to ask the user
|
other code in this stage. So it's a safe way to ask the user
|
||||||
for more input before any other installer steps start.
|
for more input before any other installer steps start.
|
||||||
"""
|
"""
|
||||||
|
return True
|
||||||
# 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 __name__ == 'i3-wm':
|
if __name__ == 'i3-wm':
|
||||||
# install the i3 group now
|
# install the i3 group now
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,20 @@ def _prep_function(*args, **kwargs):
|
||||||
|
|
||||||
supported_configurations = ['i3-wm', 'i3-gaps']
|
supported_configurations = ['i3-wm', 'i3-gaps']
|
||||||
desktop = archinstall.generic_select(supported_configurations, 'Select your desired configuration: ')
|
desktop = archinstall.generic_select(supported_configurations, 'Select your desired configuration: ')
|
||||||
|
|
||||||
# Temporarily store the selected desktop profile
|
# Temporarily store the selected desktop profile
|
||||||
# in a session-safe location, since this module will get reloaded
|
# in a session-safe location, since this module will get reloaded
|
||||||
# the next time it gets executed.
|
# the next time it gets executed.
|
||||||
archinstall.storage['_desktop_profile'] = desktop
|
archinstall.storage['_desktop_profile'] = desktop
|
||||||
|
|
||||||
|
# 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')
|
||||||
|
|
||||||
profile = archinstall.Profile(None, desktop)
|
profile = archinstall.Profile(None, desktop)
|
||||||
# Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.
|
# Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.
|
||||||
with profile.load_instructions(namespace=f"{desktop}.py") as imported:
|
with profile.load_instructions(namespace=f"{desktop}.py") as imported:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue