2016-09-27 08:13:42 +00:00
|
|
|
# vim: ft=ruby
|
|
|
|
|
2016-09-28 20:30:07 +00:00
|
|
|
class BspwmTaskbar < Worker
|
|
|
|
def mainloop()
|
2017-05-23 01:39:57 +00:00
|
|
|
IO.popen("xtitle -s -f '%s\n'") do |pipe|
|
2016-09-27 10:03:14 +00:00
|
|
|
pipe.each do |line|
|
2017-05-22 16:46:44 +00:00
|
|
|
line.chomp!
|
|
|
|
|
|
|
|
if line == ""
|
2016-09-28 20:30:07 +00:00
|
|
|
self.write ""
|
2016-09-27 10:03:14 +00:00
|
|
|
else
|
2017-05-22 16:46:44 +00:00
|
|
|
tmpl = Template.new(@my_config['begin'] + line + @my_config['end'])
|
2016-09-29 12:27:42 +00:00
|
|
|
self.write tmpl.render(@config, nil)
|
2016-09-27 10:03:14 +00:00
|
|
|
end
|
2016-09-27 08:13:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-09-28 20:30:07 +00:00
|
|
|
Modules.add("bspwm_taskbar", "BspwmTaskbar")
|