new module and some tweaks
This commit is contained in:
17
mod/battery
Normal file
17
mod/battery
Normal file
@@ -0,0 +1,17 @@
|
||||
# vim: ft=ruby
|
||||
|
||||
class Battery < Worker
|
||||
require 'open3'
|
||||
|
||||
def mainloop()
|
||||
while true do
|
||||
Open3.popen2("acpi") {|i,o,t|
|
||||
self.write(o.gets.split[3])
|
||||
}
|
||||
|
||||
sleep(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Modules.add("battery", "Battery")
|
Reference in New Issue
Block a user