2016-09-27 08:13:42 +00:00
|
|
|
# vim: ft=ruby
|
|
|
|
|
|
|
|
class ModBspwmTaskbar < ModBasic
|
|
|
|
@@mod_name = 'bspwm_taskbar'
|
|
|
|
|
|
|
|
def data_loop()
|
|
|
|
while true do
|
2016-09-27 10:03:14 +00:00
|
|
|
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
|
|
|
|
|
2016-09-27 08:13:42 +00:00
|
|
|
$queue << 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ModBspwmTaskbar.new.mainloop()
|