From 1d51c8b2cf773c3759aad4c36f175397b25f9ee4 Mon Sep 17 00:00:00 2001 From: razec3 Date: Mon, 19 Jan 2026 17:27:17 +0100 Subject: [PATCH] feat: Show warning when terminal is too small --- src/cli_clock/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli_clock/main.py b/src/cli_clock/main.py index 344499b..1aabb72 100644 --- a/src/cli_clock/main.py +++ b/src/cli_clock/main.py @@ -43,7 +43,12 @@ def main(stdscr) -> None: draw_functions[current_tab](stdscr, _height, _width) except curses.error: - pass # Terminal too small... + warning_message = "Terminal size too small! Resize to continue or [Q]uit" + stdscr.erase() + try: + stdscr.addstr(_height // 2, _width // 2 - len(warning_message) // 2, warning_message) + except curses.error: + pass except KeyError as e: print(f"Error: attempted to open tab {current_tab} but it does not exist! ({e})")