Change formatting
This commit is contained in:
parent
6197212f2b
commit
4484ae670f
1 changed files with 2 additions and 2 deletions
|
@ -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 ""
|
repo = f"::{info['repo']}" if info["repo"] != default_repo else ""
|
||||||
name = f"{name_version}{category_colour}{repo}"
|
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 "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue