21 lines
		
	
	
		
			385 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			385 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(@my_config['begin'] + line.chomp + @my_config['end'])
 | |
| 					self.write tmpl.render(@config, nil)
 | |
| 				end
 | |
| 			end
 | |
| 		end
 | |
| 	end
 | |
| end
 | |
| 
 | |
| Modules.add("bspwm_taskbar", "BspwmTaskbar")
 |