3

I run KDE with Awesome WM. Sometimes, I have no window (client) open and press Mod4+C to close a window, but plasma-desktop is selected. So it kills plasma-desktop which makes my background image and other background things.

Is there some way to prevent this for the given window class? Something I can put into the rules section of the rc.lua?

1 Answers1

1

You write a function that checks the class of the window before calling the actual kill() method. This goes into the rc.lua:

function wrapped_kill(client)
    if client.class ~= 'Plasma' then
        client:kill()
    end
end

Then exchange the function where the keys are bound:

clientkeys = awful.util.table.join(
    …
    awful.key({ modkey, }, "c", function (c) wrapped_kill(c) end),
    …
)
  • Awesome answer (literally). client.class was what I needed.

    Shouldn't client.type ~= 'desktop' work for any DE?

    – TuxForLife Nov 14 '15 at 22:43