diff --git a/contact/ui/contact_ui.py b/contact/ui/contact_ui.py index 4d03beb..06e5b9b 100644 --- a/contact/ui/contact_ui.py +++ b/contact/ui/contact_ui.py @@ -23,8 +23,8 @@ def handle_resize(stdscr: curses.window, firstrun: bool) -> None: height, width = stdscr.getmaxyx() # Define window dimensions and positions - channel_width = 3 * (width // 16) - nodes_width = 5 * (width // 16) + channel_width = int(config.channel_list_16ths) * (width // 16) + nodes_width = int(config.node_list_16ths) * (width // 16) messages_width = width - channel_width - nodes_width if firstrun: diff --git a/contact/ui/default_config.py b/contact/ui/default_config.py index 41a068c..feaeb1b 100644 --- a/contact/ui/default_config.py +++ b/contact/ui/default_config.py @@ -127,6 +127,8 @@ def initialize_config() -> Dict[str, object]: "node_ignored": ["red", "black"], } default_config_variables = { + "node_list_16ths": "5", + "channel_list_16ths": "3", "db_file_path": db_file_path, "log_file_path": log_file_path, "message_prefix": ">>", @@ -170,9 +172,12 @@ def assign_config_variables(loaded_config: Dict[str, object]) -> None: global db_file_path, log_file_path, message_prefix, sent_message_prefix global notification_symbol, ack_implicit_str, ack_str, nak_str, ack_unknown_str + global node_list_16ths, channel_list_16ths global theme, COLOR_CONFIG global node_sort + node_list_16ths = loaded_config["node_list_16ths"] + channel_list_16ths = loaded_config["channel_list_16ths"] db_file_path = loaded_config["db_file_path"] log_file_path = loaded_config["log_file_path"] message_prefix = loaded_config["message_prefix"]