From 38bcd7a436a823ce41bf2fc438907274043b2ce3 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 1 Mar 2024 15:37:08 -0800 Subject: add centring module --- panel.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'panel.py') diff --git a/panel.py b/panel.py index 17c41ca..8a11f9e 100755 --- a/panel.py +++ b/panel.py @@ -96,6 +96,12 @@ class ModText(Mod): buf = Fmt.bg(bg, buf) self.out = buf +class ModCentre(Mod): + def __init__(self, **kwargs): + kwargs.setdefault('spacing', 0) + super().__init__(**kwargs) + self.out = '%{c}' + class ModRight(Mod): def __init__(self, **kwargs): kwargs.setdefault('spacing', 0) -- cgit v1.2.3-70-g09d2