diff --git a/calmwm.c b/calmwm.c index 521d1f9..d95c206 100644 --- a/calmwm.c +++ b/calmwm.c @@ -82,6 +82,8 @@ main(int argc, char **argv) if (signal(SIGCHLD, sighdlr) == SIG_ERR) err(1, "signal"); + if (signal(SIGHUP, sighdlr) == SIG_ERR) + err(1, "signal"); Conf.homedir = getenv("HOME"); if ((Conf.homedir == NULL) || (Conf.homedir[0] == '\0')) { @@ -221,6 +223,9 @@ sighdlr(int sig) (pid < 0 && errno == EINTR)) ; break; + case SIGHUP: + cwm_status = CWM_EXEC_WM; + break; } errno = save_errno; diff --git a/cwm.1 b/cwm.1 index d81b223..d8ffb07 100644 --- a/cwm.1 +++ b/cwm.1 @@ -184,6 +184,14 @@ List all available items. .It Ic [Esc] Cancel. .El +.Pp +.Nm +rereads its configuration file when it receives a hangup signal, +.Dv SIGHUP , +by executing itself with the name and arguments with which it was started. +This is equivilant to the +.Ar restart +function. .Sh SEARCH .Nm features the ability to search for windows by their current title,