20 lines
390 B
Ruby
20 lines
390 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
|
|
self.write @config['mod']['bspwm_taskbar']['begin'].erb + line.chomp + @config['mod']['bspwm_taskbar']['end'].erb + "\n"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
Modules.add("bspwm_taskbar", "BspwmTaskbar")
|