2016-09-27 08:13:42 +00:00
|
|
|
# vim: ft=ruby
|
|
|
|
|
2016-09-28 20:30:07 +00:00
|
|
|
class BspwmTaskbar < Worker
|
|
|
|
def mainloop()
|
2016-09-27 08:13:42 +00:00
|
|
|
while true do
|
2016-09-27 10:03:14 +00:00
|
|
|
pipe = IO.popen("xtitle -s -f '%s'")
|
|
|
|
|
|
|
|
pipe.each do |line|
|
|
|
|
if line == "\n"
|
2016-09-28 20:30:07 +00:00
|
|
|
self.write ""
|
2016-09-27 10:03:14 +00:00
|
|
|
else
|
2016-09-28 20:30:07 +00:00
|
|
|
self.write @config['mod']['bspwm_taskbar']['begin'].erb + line.chomp + @config['mod']['bspwm_taskbar']['end'].erb + "\n"
|
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")
|