* config.c: Parses the configuration (received from i3).
*
*/
+#include "common.h"
+
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
-#include "common.h"
-
static char *cur_key;
static bool parsing_bindings;
static bool parsing_tray_outputs;
if (!strcmp(cur_key, "modifier")) {
DLOG("modifier = %.*s\n", len, val);
+ if (len == 4 && !strncmp((const char *)val, "none", strlen("none"))) {
+ config.modifier = XCB_NONE;
+ return 1;
+ }
+
if (len == 5 && !strncmp((const char *)val, "shift", strlen("shift"))) {
config.modifier = ShiftMask;
return 1;
case '3':
config.modifier = Mod3Mask;
return 1;
- /*
- case '4':
- config.modifier = Mod4Mask;
- return 1;
- */
case '5':
config.modifier = Mod5Mask;
return 1;
}
}
+
config.modifier = Mod4Mask;
return 1;
}
if (!strcmp(cur_key, "status_command")) {
DLOG("command = %.*s\n", len, val);
+ FREE(config.command);
sasprintf(&config.command, "%.*s", len, val);
return 1;
}