# vim: ft=ruby class ModBspwmTaskbar < ModBasic @@mod_name = 'bspwm_taskbar' def data_loop() while true do pipe = IO.popen("xtitle -s -f '%s'") $children << pipe.pid pipe.each do |line| if line == "\n" $panel_data[@@mod_name.to_sym] = "" else $panel_data[@@mod_name.to_sym] = $config['mod']['bspwm_taskbar']['begin'].erb + line.chomp + $config['mod']['bspwm_taskbar']['end'].erb end $queue << 1 end end end end ModBspwmTaskbar.new.mainloop()