mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Reload config+theme on SIGHUP
This commit is contained in:
parent
745915c0ba
commit
1721b339da
6 changed files with 80 additions and 26 deletions
14
src/action.c
14
src/action.c
|
|
@ -1,8 +1,14 @@
|
|||
#include <strings.h>
|
||||
|
||||
#include "labwc.h"
|
||||
#include "common/spawn.h"
|
||||
#include "common/log.h"
|
||||
|
||||
#include <strings.h>
|
||||
static void reconfigure(void)
|
||||
{
|
||||
char *const args[] = { "killall", "-SIGHUP", "labwc", NULL };
|
||||
execvp(args[0], args);
|
||||
}
|
||||
|
||||
void action(struct server *server, const char *action, const char *command)
|
||||
{
|
||||
|
|
@ -10,11 +16,13 @@ void action(struct server *server, const char *action, const char *command)
|
|||
return;
|
||||
if (!strcasecmp(action, "Exit")) {
|
||||
wl_display_terminate(server->wl_display);
|
||||
} else if (!strcasecmp(action, "Execute")) {
|
||||
spawn_async_no_shell(command);
|
||||
} else if (!strcasecmp(action, "NextWindow")) {
|
||||
server->cycle_view =
|
||||
desktop_next_view(server, server->cycle_view);
|
||||
} else if (!strcasecmp(action, "Execute")) {
|
||||
spawn_async_no_shell(command);
|
||||
} else if (!strcasecmp(action, "Reconfigure")) {
|
||||
reconfigure();
|
||||
} else if (!strcasecmp(action, "debug-views")) {
|
||||
dbg_show_views(server);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue