diff --git a/README.md b/README.md index db495ef..b3fe9a6 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,6 @@ The CLI bard relies on your terminal using a font patched with the "Powerline" characters. The recommended fonts are the ones from the [Nerd font project](https://www.nerdfonts.com/). -You may also need to install the `libgirepository-2.0-dev` on your system. - Usage ===== diff --git a/pyproject.toml b/pyproject.toml index 3ca614c..b959cb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,30 +1,15 @@ -[project] +[tool.poetry] name = "clibard" version = "0.1.0" description = "See all your notifications in the terminal" -authors = [ - { name = "nojhan", email = "nojhan@nojhan.net" }, -] +authors = ["nojhan "] readme = "README.md" -requires-python = ">3.11" -dependencies = [ - "faker>=0.7.4", - "humanize>=4.11", - "rich>=13.9", - "dbus-python>=1.3", - "PyGObject>=3.50", # You may need to install the system package for libgirepository-2.0-dev -] - -[project.scripts] -clibard = "clibard.clibard:main" - - -[build-system] -requires = ["setuptools>=68", "wheel"] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -where = ["src"] -include = ["clibard"] +[tool.poetry.dependencies] +python = "^3.11" +faker = "^0.7.4" +humanize = "^4.11" +rich = "^13.9" +dbus-python = "^1.3" +PyGObject = "^3.50" # You may need to install the system package for libgirepository1.0-dev diff --git a/src/clibard/clibard.py b/src/clibard/clibard.py index 45d05c8..cb8baa8 100755 --- a/src/clibard/clibard.py +++ b/src/clibard/clibard.py @@ -272,15 +272,13 @@ 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({bs})", + border_style=f"color({self.color[self.urgency]})", safe_box = False, ) console.print(box) @@ -414,7 +412,7 @@ def test_messages(nb = 7): return notifs -def main(): +if __name__ == "__main__": import sys import argparse @@ -457,7 +455,3 @@ def main(): elif asked.layout[0] == "v": broker = VerticalBroker(msg_cls=MessageBox) broker.run() - - -if __name__ == "__main__": - main()