index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | aboven <arieboven@protonmail.com> | 2021-05-08 13:18:03 +0200 |
---|---|---|
committer | aboven <arieboven@protonmail.com> | 2021-05-08 13:18:03 +0200 |
commit | 24a14d1800e990e2e90dd628b8460f85fe3d1495 (patch) | |
tree | 1d376e16c33f77937b7dd473a9bc7a2f9883771c | |
parent | 52ac03d9525d0e62fef113eec057a1e846637506 (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 4 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index be01594e..1240e0be 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -83,16 +83,18 @@ def get_password(prompt="Enter a password: "): def print_large_list(options, padding=5, margin_bottom=0, separator=': '): highest_index_number_length = len(str(len(options))) longest_line = highest_index_number_length + len(separator) + get_longest_option(options) + padding + spaces_without_option = longest_line - (len(separator) + highest_index_number_length) max_num_of_columns = get_terminal_width() // longest_line max_options_in_cells = max_num_of_columns * (get_terminal_height()-margin_bottom) if (len(options) > max_options_in_cells): for index, option in enumerate(options): print(f"{index}: {option}") + return 1, index else: for row in range(0, (get_terminal_height()-margin_bottom)): for column in range(row, len(options), (get_terminal_height()-margin_bottom)): - spaces = " "*(longest_line - len(options[column])) + spaces = " "*(spaces_without_option - len(options[column])) print(f"{str(column): >{highest_index_number_length}}{separator}{options[column]}", end = spaces) print() |