From 36d723e7e6dfb175c9dab2500b06d164be8616f3 Mon Sep 17 00:00:00 2001 From: Tobi-wan Kenobi Date: Tue, 15 Nov 2016 20:34:14 +0100 Subject: [PATCH] [modules/memory] Adapt limits Limits are now actually against the amount of memory used, instead of memory still free (more intuitive). fixes #12 --- bumblebee/modules/memory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bumblebee/modules/memory.py b/bumblebee/modules/memory.py index d8d08b2..70b10b2 100644 --- a/bumblebee/modules/memory.py +++ b/bumblebee/modules/memory.py @@ -7,8 +7,8 @@ def description(): def parameters(): return [ - "memory.warning: Warning threshold in % of memory still available (defaults to 20%)", - "memory.critical: Critical threshold in % of memory still available (defaults to 10%)", + "memory.warning: Warning threshold in % of memory used (defaults to 80%)", + "memory.critical: Critical threshold in % of memory used (defaults to 90%)", ] class Module(bumblebee.module.Module): @@ -30,9 +30,9 @@ class Module(bumblebee.module.Module): ) def warning(self, widget): - return self._mem.percent < self._config.parameter("warning", 20) + return self._mem.percent > self._config.parameter("warning", 80) def critical(self, widget): - return self._mem.percent < self._config.parameter("critical", 10) + return self._mem.percent > self._config.parameter("critical", 90) # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4