Fix rules throwing errors with only one screen attached

This commit is contained in:
crater2150 2019-08-26 17:14:03 +02:00
parent c6265f985f
commit 2699230f05

View file

@ -14,6 +14,8 @@ local function popup_urgent(client, message)
end) end)
end end
screen2 = screen:count() > 1 and 2 or 1
awful.rules.rules = { awful.rules.rules = {
-- All clients will match this rule. -- All clients will match this rule.
{ {
@ -96,7 +98,7 @@ awful.rules.rules = {
{ {
rule = { class = "Eclipse", name = nil, type = "dialog" }, rule = { class = "Eclipse", name = nil, type = "dialog" },
properties = { properties = {
screen = 2, tag = "8", screen = screen2, tag = "8",
floating = false floating = false
} }
}, },
@ -149,7 +151,7 @@ awful.rules.rules = {
rule_any = { instance = {"Gmutt"}, name = {"Gmutt"} }, rule_any = { instance = {"Gmutt"}, name = {"Gmutt"} },
properties = { properties = {
tag = "4", tag = "4",
screen = 2 screen = screen2
} }
}, },
{ {