From 6e8acc2765c340a7bfaef523638d2594d54714f1 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Thu, 3 Nov 2016 19:45:48 +0100 Subject: [PATCH] [modules/memory] Show used instead of free RAM --- bumblebee/modules/memory.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bumblebee/modules/memory.py b/bumblebee/modules/memory.py index e3d1bd2..8245733 100644 --- a/bumblebee/modules/memory.py +++ b/bumblebee/modules/memory.py @@ -22,10 +22,9 @@ class Module(bumblebee.module.Module): def data(self): self._mem = psutil.virtual_memory() - free = self._mem.available - total = self._mem.total + used = self._mem.total - self._mem.available - return "{}/{} ({:05.02f}%)".format(bumblebee.util.bytefmt(self._mem.available), bumblebee.util.bytefmt(self._mem.total), 100.0 - self._mem.percent) + return "{}/{} ({:05.02f}%)".format(bumblebee.util.bytefmt(used), bumblebee.util.bytefmt(self._mem.total), self._mem.percent) def warning(self): return self._mem.percent < 20