lazy quick fixes
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
e321246abc
commit
d11ae9ff4c
@ -4,14 +4,10 @@ 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]
|
|
||||||
|
|
||||||
if @my_config.has_key?("monitors") == false || @my_config['monitors'].include?(monitor)
|
|
||||||
self.write parse_data(line)
|
self.write parse_data(line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def parse_data(string)
|
def parse_data(string)
|
||||||
# Example: WMDVI-I-1:o1:o2:f3:f4:O5:f6:f7:f8:f9:fh:LT:TF:G
|
# Example: WMDVI-I-1:o1:o2:f3:f4:O5:f6:f7:f8:f9:fh:LT:TF:G
|
||||||
@ -42,18 +38,14 @@ class BspwmPager < Worker
|
|||||||
out << " #{n} "
|
out << " #{n} "
|
||||||
end
|
end
|
||||||
when /^L.+/
|
when /^L.+/
|
||||||
@layout = n
|
case n
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
case @layout
|
|
||||||
when "T"
|
when "T"
|
||||||
layout_flag = "t"
|
out << " t "
|
||||||
when "M"
|
when "M"
|
||||||
layout_flag = "m"
|
out << " m "
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
out << " #{layout_flag} "
|
|
||||||
|
|
||||||
return out.join.chomp
|
return out.join.chomp
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user