err(-1, "Could not set O_NONBLOCK");
}
-/*
- * Emulates mkdir -p (creates any missing folders)
- *
- */
-bool mkdirp(const char *path) {
- if (mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0)
- return true;
- if (errno != ENOENT) {
- ELOG("mkdir(%s) failed: %s\n", path, strerror(errno));
- return false;
- }
- char *copy = sstrdup(path);
- /* strip trailing slashes, if any */
- while (copy[strlen(copy) - 1] == '/')
- copy[strlen(copy) - 1] = '\0';
-
- char *sep = strrchr(copy, '/');
- if (sep == NULL) {
- FREE(copy);
- return false;
- }
- *sep = '\0';
- bool result = false;
- if (mkdirp(copy))
- result = mkdirp(path);
- free(copy);
-
- return result;
-}
-
/*
* Sends the specified event to all IPC clients which are currently connected
* and subscribed to this kind of event.
y(integer, bind->keycode);
ystr("input_type");
- ystr((const char*)(bind->input_type == B_KEYBOARD ? "keyboard" : "mouse"));
+ ystr((const char *)(bind->input_type == B_KEYBOARD ? "keyboard" : "mouse"));
ystr("symbol");
if (bind->symbol == NULL)
ystr("transient_for");
if (con->window->transient_for == XCB_NONE)
y(null);
- else y(integer, con->window->transient_for);
+ else
+ y(integer, con->window->transient_for);
y(map_close);
}
y(array_open);
Match *match;
TAILQ_FOREACH(match, &(con->swallow_head), matches) {
+ /* We will generate a new restart_mode match specification after this
+ * loop, so skip this one. */
+ if (match->restart_mode)
+ continue;
y(map_open);
if (match->dock != -1) {
ystr("dock");
YSTR_IF_SET(status_command);
YSTR_IF_SET(font);
+ if (config->separator_symbol) {
+ ystr("separator_symbol");
+ ystr(config->separator_symbol);
+ }
+
ystr("workspace_buttons");
y(bool, !config->hide_workspace_buttons);