lazy quick fixes
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
e321246abc
commit
d11ae9ff4c
|
@ -4,11 +4,7 @@ class BspwmPager < Worker
|
|||
def mainloop()
|
||||
IO.popen("bspc subscribe") do |pipe|
|
||||
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)
|
||||
end
|
||||
self.write parse_data(line)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -25,7 +21,7 @@ class BspwmPager < Worker
|
|||
next
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
case part
|
||||
when /^M.+/
|
||||
out << "%{B#{@config['colours']['mon_focused']}} #{n} %{B-}"
|
||||
|
@ -42,19 +38,15 @@ class BspwmPager < Worker
|
|||
out << " #{n} "
|
||||
end
|
||||
when /^L.+/
|
||||
@layout = n
|
||||
case n
|
||||
when "T"
|
||||
out << " t "
|
||||
when "M"
|
||||
out << " m "
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
case @layout
|
||||
when "T"
|
||||
layout_flag = "t"
|
||||
when "M"
|
||||
layout_flag = "m"
|
||||
end
|
||||
|
||||
out << " #{layout_flag} "
|
||||
|
||||
return out.join.chomp
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user