moltenbar/mod/bspwm_taskbar

21 lines
427 B
Ruby

# vim: ft=ruby
class BspwmTaskbar < Worker
def mainloop()
while true do
pipe = IO.popen("xtitle -s -f '%s'")
pipe.each do |line|
if line == "\n"
self.write ""
else
tmpl = Template.new(@config['mod']['bspwm_taskbar']['begin'] + line.chomp + @config['mod']['bspwm_taskbar']['end'])
self.write tmpl.render(@config, nil)
end
end
end
end
end
Modules.add("bspwm_taskbar", "BspwmTaskbar")