Skip to content
Snippets Groups Projects
Commit be0d76f4 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix output width of freemem.

parent ed65c30f
Branches master
No related tags found
No related merge requests found
...@@ -16,9 +16,9 @@ with open("/proc/meminfo") as f: ...@@ -16,9 +16,9 @@ with open("/proc/meminfo") as f:
usedGB, totalGB)) usedGB, totalGB))
part = used / total part = used / total
width = 80 width = 80 - 7
filled = int(80 * part) filled = int(width * part)
empty = 80 - filled empty = width - filled
print ( "[{}{}] {:3}%".format( print ( "[{}{}] {:3}%".format(
filled * "#", filled * "#",
empty * " ", empty * " ",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment