network fix

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2017-02-13 19:07:55 +03:00
parent eba0c0df0b
commit 7d9639cf48
2 changed files with 13 additions and 1 deletions

12
mod/layout Normal file
View File

@ -0,0 +1,12 @@
# vim: ft=ruby
class Layout < Worker
def mainloop()
loop do
self.write `xkblayout-state print "%s"`
sleep(0.1)
end
end
end
Modules.add("layout", "Layout")

View File

@ -26,7 +26,7 @@ class Network < Worker
status = "CRIT: all hosts failed!" status = "CRIT: all hosts failed!"
fg_colour = @my_config['crit_colour'] fg_colour = @my_config['crit_colour']
else else
status = "WARN: #{net_ok} host(s) failed" status = "WARN: #{net_ok}/#{hosts.count} hosts ok"
fg_colour = @my_config['warn_colour'] fg_colour = @my_config['warn_colour']
end end