hiding load average in ok status is now optional
This commit is contained in:
parent
d2ded008d2
commit
9db9a935d4
2 changed files with 3 additions and 2 deletions
2
conf.ini
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
|
||||
|
|
|
@ -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…
Reference in a new issue