summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2024-03-01 15:37:08 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2024-03-01 15:37:08 -0800
commit38bcd7a436a823ce41bf2fc438907274043b2ce3 (patch)
tree37436851cdb3c6faa8744a391bb4b484647f7243
parentf87ef86275d077cb45ee546fb53efd2334f43318 (diff)
downloadpanel-38bcd7a436a823ce41bf2fc438907274043b2ce3.tar.gz
panel-38bcd7a436a823ce41bf2fc438907274043b2ce3.tar.xz
add centring module
-rwxr-xr-xpanel.py6
1 files changed, 6 insertions, 0 deletions
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)