feat(box): color based on the hash of the app

Instead of based on the urgency.
This commit is contained in:
Johann Dreo 2025-03-13 16:30:25 +01:00
commit ddfe1c6eb6

View file

@ -272,13 +272,15 @@ class MessageBox(Message):
title = f"{self.icons[self.urgency]} {summ} {self.app}" title = f"{self.icons[self.urgency]} {summ} {self.app}"
# title = f"[{summ_color}]{self.summary}[/]─ {self.app}" # title = f"[{summ_color}]{self.summary}[/]─ {self.app}"
bs = self.hash_color(self.app)
box = rich.panel.Panel( box = rich.panel.Panel(
f"[{body_color}]{self.body}[/]", f"[{body_color}]{self.body}[/]",
title=title, title=title,
title_align="left", title_align="left",
# subtitle = self.icons[self.urgency], # subtitle = self.icons[self.urgency],
# subtitle_align = "left", # subtitle_align = "left",
border_style=f"color({self.color[self.urgency]})", border_style=f"color({bs})",
safe_box = False, safe_box = False,
) )
console.print(box) console.print(box)