diff --git a/pyesearch.py b/pyesearch.py index d6e9025..194700c 100755 --- a/pyesearch.py +++ b/pyesearch.py @@ -151,9 +151,9 @@ def format_item(info, longest_cat=0, longest_namever=0, default_repo=None): repo = f"::{info['repo']}" if info["repo"] != default_repo else "" name = f"{name_version}{category_colour}{repo}" - filler = ("\x1b[90m " + ("╴" * (longest_namever - len(name_version) - len(repo)))) if info["description"] else "" + filler = (f"\x1b[{'92' if info['installed'] else '90'}m " + ("." * (longest_namever - len(name_version) - len(repo)))) if info["description"] else "" - return f"{category_colour}{info['category']:>{longest_cat}}/{name_colour}{name}{filler}" + (f"╴{category_colour}─ \x1b[0m{info['description']}" if info["description"] else "") + return f"{category_colour}{info['category']:>{longest_cat}}/{name_colour}{name}{filler}" + ("\x1b[0m" if not info["installed"] else "") + (f" {info['description']}" if info["description"] else "")