rules: apply keyboard layer 3 to window classes starting with steam_app_

This commit is contained in:
Alexander Gehrke 2025-02-15 11:26:36 +01:00
parent 821d35c8df
commit 61fd6aef87

View file

@ -37,6 +37,10 @@ local screen_chat = math.min(localconf.screen.chat or screen.count(), screen.cou
local screen_mail = math.min(localconf.screen.mail or screen.count(), screen.count())
print("Screens: main: " .. screen_main .. ", chat: " .. screen_chat .. ", mail: " .. screen_mail)
function startswith(str, start)
return str:sub(1, #start) == start
end
awful.rules.rules = {
-- All clients will match this rule.
{
@ -55,6 +59,9 @@ awful.rules.rules = {
},
-- log name and class of new windows for debugging purposes
callback = function(c)
if startswith(c["class"], "steam_app_") then
keyboard_layer(3)(c)
end
log("-----------\nnew client\n")
if c["name"] ~= nil then
log("name: " .. c["name"])