diff options
author | Von Random <von@vdrandom.org> | 2016-11-03 18:59:00 +0300 |
---|---|---|
committer | Von Random <von@vdrandom.org> | 2016-11-03 18:59:00 +0300 |
commit | 9db9a935d486a227c16051aef49b40a267533525 (patch) | |
tree | 8cfee10fa37f6f1963b39e08361d4ea0bc0f6bd2 | |
parent | d2ded008d24a39dc743f3ee26198cdad80031caf (diff) |
hiding load average in ok status is now optional
-rw-r--r-- | conf.ini | 2 | ||||
-rw-r--r-- | plugins/load.py | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -5,7 +5,7 @@ format = i3 plugin = ping hosts = de-ber-as20647.anchors.atlas.ripe.net,nl-ams-as1101.anchors.atlas.ripe.net,uk-boh-as196745.anchors.atlas.ripe.net title = NET -colors = #00FF00,#FF0000 +hide_ok = true [memory] plugin = mem diff --git a/plugins/load.py b/plugins/load.py index 5a01cf0..e140ba0 100644 --- a/plugins/load.py +++ b/plugins/load.py @@ -12,6 +12,7 @@ class PluginThread(threading.Thread): if config.has_option(section, 'color'): self.status['color'] = config.get(section, 'color') self.freq = config.getint(section, 'freq', fallback=10) + self.hide_ok = config.getboolean(section, 'hide_ok', fallback=False) self.hide = False self.problem_value = config.getint(section, 'problem', fallback=100) @@ -21,7 +22,7 @@ class PluginThread(threading.Thread): self.hide = False self.status['urgent'] = True else: - self.hide = True + self.hide = self.hide_ok self.status['urgent'] = False loads = [str(i) for i in loads] self.status['full_text'] = 'LA: ' + ' '.join(loads) |