mirror of
https://github.com/pdxlocations/contact.git
synced 2026-03-28 17:12:35 +01:00
Make widths configurable (#189)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user