Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cli_clock/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})")

Expand Down