Quote:
Originally Posted by twobob
I believe there was a default keybinding CMD + R (or something) that causes awesome to reload it's configuration while running...
Another gem to be dug up perhaps one day. *makes notes*
|
It's not default keybinding, it should be set explicitly (to invoke function
awesome.restart).
I came to something different but also useful for this case (using overrided
rc.lua):
Code:
package.path = "/var/tmp/root/.config/awesome/?.lua;" .. package.path
dofile("/etc/xdg/awesome/rc.lua")
local lipcH, errNum, errMsg = lipc.init("com.lab126.winmgr.extra")
if not lipcH then
log ("!!!!!!!!!!!failed to init lipc " .. tostring(errNum) .. ", " .. errMsg)
else
lipcH:register_string_property("restart", "w").listener = awesome.restart
awesome.add_signal("exit", lipcH:close)
end
Then just:
Code:
$ lipc-set-prop com.lab126.winmgr.extra restart now
Instead "now" any string value could be used.
Unfortunately, every restart creates additional
/bin/sh -c awesome process hanging around. And according to
awesome sources, it's by design:
Spoiler:
Code:
void
awesome_restart(void)
{
awesome_atexit(true);
a_exec(globalconf.argv);
}
Code:
void
a_exec(const char *cmd)
{
static const char *shell = NULL;
if(!shell && !(shell = getenv("SHELL")))
shell = "/bin/sh";
execl(shell, shell, "-c", cmd, NULL);
}