From ddfe1c6eb6044a115862bbdc98eef439e2ca0f82 Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 13 Mar 2025 16:30:25 +0100 Subject: [PATCH] feat(box): color based on the hash of the app Instead of based on the urgency. --- src/clibard/clibard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clibard/clibard.py b/src/clibard/clibard.py index cb8baa8..8613bbe 100755 --- a/src/clibard/clibard.py +++ b/src/clibard/clibard.py @@ -272,13 +272,15 @@ class MessageBox(Message): title = f"{self.icons[self.urgency]} {summ} {self.app}" # title = f"[{summ_color}]{self.summary}[/]─ {self.app}" + bs = self.hash_color(self.app) + box = rich.panel.Panel( f"[{body_color}]{self.body}[/]", title=title, title_align="left", # subtitle = self.icons[self.urgency], # subtitle_align = "left", - border_style=f"color({self.color[self.urgency]})", + border_style=f"color({bs})", safe_box = False, ) console.print(box)