layout is per-monitor

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2017-05-24 16:39:18 +03:00
parent 71940157c7
commit 1e11e1422c
1 changed files with 4 additions and 5 deletions

View File

@ -14,8 +14,7 @@ class BspwmPager < Worker
out = [] out = []
monitor = "" monitor = ""
state = { state = {
monitors: {}, monitors: {}
layout: ""
} }
string.chomp[1..-1].split(":").each do |part| string.chomp[1..-1].split(":").each do |part|
@ -39,7 +38,7 @@ class BspwmPager < Worker
urgent: d_urgent urgent: d_urgent
} }
elsif part[0] == "L" elsif part[0] == "L"
state[:layout] = n state[:monitors][monitor][:layout] = n
end end
end end
@ -70,9 +69,9 @@ class BspwmPager < Worker
end end
end end
if state[:layout] == "T" if m[:layout] == "T"
out << " t " out << " t "
elsif state[:layout] == "M" elsif m[:layout] == "M"
out << " m " out << " m "
end end
end end