index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Ninchester <5041877+ninchester@users.noreply.github.com> | 2021-03-20 22:01:00 +0100 |
---|---|---|
committer | Ninchester <5041877+ninchester@users.noreply.github.com> | 2021-03-20 22:01:00 +0100 |
commit | 42ba36b5d8ab5a8442bb4996815598ef517003a2 (patch) | |
tree | ff842e87ed98ae352605c29e9cb35bf89dc40a60 /archinstall/lib | |
parent | 6dea24ad22a84f35b3416da3440b03768a2afefe (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 5 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index e7fba747..d82068a7 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -28,7 +28,8 @@ def get_password(prompt="Enter a password: "): return None def print_large_list(options, padding=5, margin_bottom=0, separator=': '): - longest_line = len(str(len(options))) + len(separator) + get_longest_option(options) + padding + highest_index_number_length = len(str(len(options))) + longest_line = highest_index_number_length + len(separator) + get_longest_option(options) + padding max_num_of_columns = get_terminal_width() // longest_line max_options_in_cells = max_num_of_columns * (get_terminal_height()-margin_bottom) @@ -39,7 +40,7 @@ def print_large_list(options, padding=5, margin_bottom=0, separator=': '): 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])) - print(f"{str(column).zfill(2)}{separator}{options[column]}", end = spaces) + print(f"{str(column): >{highest_index_number_length}}{separator}{options[column]}", end = spaces) print() def ask_for_superuser_account(prompt='Create a required super-user with sudo privileges: ', forced=False): |