Browse Source

hiding load average in ok status is now optional

master
Von Random 6 years ago
parent
commit
9db9a935d4
  1. 2
      conf.ini
  2. 3
      plugins/load.py

2
conf.ini

@ -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

3
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)

Loading…
Cancel
Save