rules: add keyboard layer switching via kontroll
This commit is contained in:
parent
9faaaa2285
commit
2e0484c3c7
15
rules.lua
15
rules.lua
|
@ -15,6 +15,20 @@ local function popup_urgent(client, message)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function keyboard_layer(num)
|
||||||
|
return function(client)
|
||||||
|
client:connect_signal("focus", function(c)
|
||||||
|
awful.util.spawn("kontroll set-layer --index " .. num)
|
||||||
|
naughty.notify({ text = "kontroll: switching to layer " .. num })
|
||||||
|
end)
|
||||||
|
client:connect_signal("unfocus", function(c)
|
||||||
|
awful.util.spawn("kontroll set-layer --index 0")
|
||||||
|
naughty.notify({ text = "kontroll: switching to base layer" })
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not localconf.screen then
|
if not localconf.screen then
|
||||||
localconf.screen = {}
|
localconf.screen = {}
|
||||||
end
|
end
|
||||||
|
@ -72,6 +86,7 @@ awful.rules.rules = {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ rule = { role = "buddy_list" }, callback = awful.client.setmaster },
|
{ rule = { role = "buddy_list" }, callback = awful.client.setmaster },
|
||||||
|
{ rule_any = { class = { "factorio" } }, callback = keyboard_layer(3) },
|
||||||
{
|
{
|
||||||
rule = { class = "steam", name = "Friends" },
|
rule = { class = "steam", name = "Friends" },
|
||||||
properties = { screen = screen_chat, tag = "3" },
|
properties = { screen = screen_chat, tag = "3" },
|
||||||
|
|
Loading…
Reference in a new issue