From 1984bea16a2a21e0f370b161828532610ca6755a Mon Sep 17 00:00:00 2001 From: tr1x_em Date: Fri, 8 Aug 2025 15:06:37 +0530 Subject: [PATCH] Truncate Weather Condtion --- modules/widget.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/widget.py b/modules/widget.py index e22a640..01e1903 100644 --- a/modules/widget.py +++ b/modules/widget.py @@ -341,11 +341,22 @@ class Weather(Box): def _create_labels(self): """Create all weather labels.""" self.city = Label( - name="city", label="Loading...", justification="right", h_align="start" + name="city", + label="Loading...", + justification="right", + h_align="start", + max_chars_width=12, + ellipsization="end", ) self.temperature = Label(name="temperature", label="--°", h_align="start") self.condition_em = Label(name="condition-emoji", label="🌤️", h_align="start") - self.condition = Label(name="condition", label="Loading...", h_align="start") + self.condition = Label( + name="condition", + label="Loading...", + max_chars_width=18, + ellipsization="end", + h_align="start", + ) self.feels_like = Label(name="feels-like", label="H:-- L:--", h_align="start") def _layout_labels(self):