Hello, I tried to extend the scratchdrop module by Lucas de Vries such that the given clients keep their "scratchdrop properties" after awesome is restarted. You can find the code here:
https://gist.github.com/fixje/4a1ef48cbbfe5ba6e070 With scratchdrop you can assign keys which toggle the visibility of certain programs that do not show up as managed clients in awesome. The list of clients managed by the scratchdrop module is stored in a variable which is re-initialized after awesome is restarted. To circumvent this issue, I put the necessary values into custom X properties and re-assign them: awesome.register_xproperty("AWESOME_SCRATCHTOP_VERT", "string") awesome.register_xproperty("AWESOME_SCRATCHTOP_HORIZ", "string") awesome.register_xproperty("AWESOME_SCRATCHTOP_WIDTH", "string") awesome.register_xproperty("AWESOME_SCRATCHTOP_HEIGHT", "string") awesome.register_xproperty("AWESOME_SCRATCHTOP_STICKY", "boolean") awesome.register_xproperty("AWESOME_SCRATCHTOP_SCREEN", "string") awesome.register_xproperty("AWESOME_SCRATCHTOP_PROG", "string") function scratchdrop.restore() for k, c in pairs(client.get()) do if c:get_xproperty("AWESOME_SCRATCHTOP_VERT") ~= "" then local vert = c:get_xproperty("AWESOME_SCRATCHTOP_VERT") local horiz = c:get_xproperty("AWESOME_SCRATCHTOP_HORIZ") local width = c:get_xproperty("AWESOME_SCRATCHTOP_WIDTH") local height = c:get_xproperty("AWESOME_SCRATCHTOP_HEIGHT") local sticky = c:get_xproperty("AWESOME_SCRATCHTOP_STICKY") local screen = c:get_xproperty("AWESOME_SCRATCHTOP_SCREEN") local prog = c:get_xproperty("AWESOME_SCRATCHTOP_PROG") width = tonumber(width) height = tonumber(height) screen = tonumber(screen) set_client_properties(c, vert, horiz, width, height, sticky, screen, prog) if not dropdown[prog] then dropdown[prog] = {} end dropdown[prog][screen] = c c.hidden = true local ctags = c:tags() for i, t in pairs(ctags) do ctags[i] = nil end c:tags(ctags) end end end The problem arises when I try to call scratchdrop.restore() from rc.lua. I tried to place it at the end of the config, but client attributed are not restored at all. On the other hand, I can just call the function from the awesome lua prompt after a successful restart and it works as I expect. Is there something I missed out from the startup process? Cheers, Markus -- To unsubscribe, send mail to [email protected].
