diff options
author | davidovski <david@davidovski.xyz> | 2022-01-19 00:05:12 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-19 00:05:12 +0000 |
commit | c684ddecd01b9e2fd56fd6582f5d0d06c0b7afd4 (patch) | |
tree | 8a80ae53fdaf288a17efeabb009b10a0f233a9da | |
parent | be11529ff79011f370ce2969dfa145dac81fbee3 (diff) |
edited statspage
-rw-r--r-- | src/util.py | 2 | ||||
-rw-r--r-- | src/xi.py | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/util.py b/src/util.py index 928cb03..e77b422 100644 --- a/src/util.py +++ b/src/util.py @@ -29,7 +29,7 @@ def is_root(): def get_area(): - columns, rows = shutil.get_terminal_size((80, 20)) + return shutil.get_terminal_size((80, 20)) def loading_bar(completed, total, text, unit="", color=DEFAULT_BAR_COLOR, reset=DEFAULT_BAR_COLOR_RESET): @@ -44,19 +44,18 @@ def print_stats(conf, opts): distro = util.get_distro()["NAME"] - print(colors.LIGHT_CYAN + ("~"*w) + colors.RESET) + w = 16 print(colors.LIGHT_CYAN + "xipkg", end="") print(colors.CYAN + " on ", end="") - print(colors.LIGHT_CYAN + distro) + print(colors.LIGHT_CYAN + distro, end="") + print(colors.CYAN + ":") - print(colors.BLUE + f"Total key count: {colors.LIGHT_BLUE}{key_count}") - print(colors.BLUE + f"Total package count: {colors.LIGHT_BLUE}{total}") for repo,count in pkg_count.items(): - print(f"\t{colors.BLUE}{repo}: {colors.LIGHT_BLUE}{count}") + print(f"{colors.BLUE}{repo}: {colors.LIGHT_BLUE}{count}") + print(colors.BLUE + ("~"*w) + colors.RESET) + print(colors.BLUE + f"Total: {colors.LIGHT_BLUE}{total}" + colors.RESET) - w, h = util.get_area() - print(colors.LIGHT_CYAN + ("~"*w) + colors.RESET) def main(): |