@@ -4,11 +4,7 @@ class BspwmPager < Worker
 | 
				
			|||||||
	def mainloop()
 | 
						def mainloop()
 | 
				
			||||||
		IO.popen("bspc subscribe") do |pipe|
 | 
							IO.popen("bspc subscribe") do |pipe|
 | 
				
			||||||
			pipe.each do |line|
 | 
								pipe.each do |line|
 | 
				
			||||||
				monitor = line.split(":")[0]
 | 
									self.write parse_data(line)
 | 
				
			||||||
 | 
					 | 
				
			||||||
				if @my_config.has_key?("monitors") == false || @my_config['monitors'].include?(monitor)
 | 
					 | 
				
			||||||
					self.write parse_data(line)
 | 
					 | 
				
			||||||
				end
 | 
					 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
@@ -42,19 +38,15 @@ class BspwmPager < Worker
 | 
				
			|||||||
						out << " #{n} "
 | 
											out << " #{n} "
 | 
				
			||||||
					end
 | 
										end
 | 
				
			||||||
				when /^L.+/
 | 
									when /^L.+/
 | 
				
			||||||
					@layout = n
 | 
										case n
 | 
				
			||||||
 | 
											when "T"
 | 
				
			||||||
 | 
												out << " t "
 | 
				
			||||||
 | 
											when "M"
 | 
				
			||||||
 | 
												out << " m "
 | 
				
			||||||
 | 
										end
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case @layout
 | 
					 | 
				
			||||||
			when "T"
 | 
					 | 
				
			||||||
				layout_flag = "t"
 | 
					 | 
				
			||||||
			when "M"
 | 
					 | 
				
			||||||
				layout_flag = "m"
 | 
					 | 
				
			||||||
		end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		out << " #{layout_flag} "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		return out.join.chomp
 | 
							return out.join.chomp
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user