From e746654b809da094e115f577812bbade24f89ed1 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Wed, 22 Mar 2023 16:37:20 +0000 Subject: [PATCH] Customise console --- utils/console.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/utils/console.py b/utils/console.py index aa63c3a..794cca6 100644 --- a/utils/console.py +++ b/utils/console.py @@ -1,5 +1,14 @@ -from rich import get_console +import shutil +from rich.console import Console + +_col, _ = shutil.get_terminal_size((80, 20)) +if _col == 80: + _col = 160 __all__ = ("console",) -console = get_console() +console = Console( + width=_col, + soft_wrap=True, + tab_size=4 +)