The AwesomeWM signal they don’t want you to know about!


-- Replace registration popup in Sublime Text with less obtrusive reminder
-- Tested in Build 4126
client.connect_signal("manage", function(c)
    if c.class == "Sublime_text" and c.name == nil and c.floating then
        c.hidden = true
        local prop = "WM_TRANSIENT_FOR" -- Trial popups lack this property
        local id = c.window
        local cmd = "xprop -id " .. id .. " | grep " .. prop
        awful.spawn.easy_async_with_shell(cmd, function(o, e, r, exitcode)
            if exitcode == 1 then
                c:kill() -- TO DO: Add a less annoying trial reminder here
            else
                c.hidden = false; c:jump_to() -- Unhide other dialog boxes
            end
        end)
    end
end)