diff --git a/src/config.c b/src/config.c index 50310c9..7a0abba 100644 --- a/src/config.c +++ b/src/config.c @@ -14,8 +14,9 @@ static void config_mouse_section(struct mbhead *mousebinds, struct conf_sec **sec) { - int i = 0; struct mousebind *m; + int i = 0; + char *p; SLIST_INIT(mousebinds); @@ -25,7 +26,10 @@ config_mouse_section(struct mbhead *mousebinds, struct conf_sec **sec) m->button = fetch_opt_first(sec[i], "1", "button").num; m->func = uicb_name_func(fetch_opt_first(sec[i], "", "func").str); - m->cmd = xstrdup(fetch_opt_first(sec[i], "", "cmd").str); + + if((p = fetch_opt_first(sec[i], "", "cmd").str)) + m->cmd = xstrdup(p); + m->use_area = false; SLIST_INSERT_HEAD(mousebinds, m, next); diff --git a/src/fifo.c b/src/fifo.c index 103b285..f3436b1 100644 --- a/src/fifo.c +++ b/src/fifo.c @@ -4,6 +4,8 @@ * For license, see COPYING. */ +#include /* access */ + #include "wmfs.h" #include "util.h" #include "config.h" @@ -24,6 +26,10 @@ fifo_init(void) { xasprintf(&(W->fifo.path), "%s/wmfs-%s.fifo", P_tmpdir, DisplayString(W->dpy)); + /* Check if fifo already exists */ + if(access(W->fifo.path, F_OK) != -1) + unlink(W->fifo.path); + if(mkfifo(W->fifo.path, 0644) < 0) warnx("Can't create FIFO: %s\n", strerror(errno)); diff --git a/wmfsrc b/wmfsrc index 0949f0f..bd72f18 100644 --- a/wmfsrc +++ b/wmfsrc @@ -90,9 +90,9 @@ [client] [mouse] button = "1" func = "client_focus_click" [/mouse] - [mouse] button = "1" func = "mouse_swap" [/mouse] - [mouse] button = "2" func = "mouse_tab" [/mouse] - [mouse] button = "3" func = "mouse_resize" [/mouse] + [mouse] button = "1" func = "mouse_swap" [/mouse] + [mouse] button = "2" func = "mouse_tab" [/mouse] + [mouse] button = "3" func = "mouse_resize" [/mouse] [/client]