feat(box): color based on the hash of the app
Instead of based on the urgency.
This commit is contained in:
parent
7b80153d15
commit
ddfe1c6eb6
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue