*/
static int config_map_key_cb(void *params_, const unsigned char *keyVal, size_t keyLen) {
FREE(cur_key);
-
- cur_key = smalloc(sizeof(unsigned char) * (keyLen + 1));
- strncpy(cur_key, (const char *)keyVal, keyLen);
- cur_key[keyLen] = '\0';
+ sasprintf(&(cur_key), "%.*s", keyLen, keyVal);
if (strcmp(cur_key, "bindings") == 0)
parsing_bindings = true;
* users updating from that version and restarting i3bar before i3. */
if (!strcmp(cur_key, "wheel_up_cmd")) {
DLOG("wheel_up_cmd = %.*s\n", len, val);
- binding_t *binding = scalloc(sizeof(binding_t));
+ binding_t *binding = scalloc(1, sizeof(binding_t));
binding->input_code = 4;
sasprintf(&(binding->command), "%.*s", len, val);
TAILQ_INSERT_TAIL(&(config.bindings), binding, bindings);
* users updating from that version and restarting i3bar before i3. */
if (!strcmp(cur_key, "wheel_down_cmd")) {
DLOG("wheel_down_cmd = %.*s\n", len, val);
- binding_t *binding = scalloc(sizeof(binding_t));
+ binding_t *binding = scalloc(1, sizeof(binding_t));
binding->input_code = 5;
sasprintf(&(binding->command), "%.*s", len, val);
TAILQ_INSERT_TAIL(&(config.bindings), binding, bindings);
COLOR(statusline, bar_fg);
COLOR(background, bar_bg);
COLOR(separator, sep_fg);
+ COLOR(focused_statusline, focus_bar_fg);
+ COLOR(focused_background, focus_bar_bg);
+ COLOR(focused_separator, focus_sep_fg);
COLOR(focused_workspace_border, focus_ws_border);
COLOR(focused_workspace_bg, focus_ws_bg);
COLOR(focused_workspace_text, focus_ws_fg);
static int config_integer_cb(void *params_, long long val) {
if (parsing_bindings) {
if (strcmp(cur_key, "input_code") == 0) {
- binding_t *binding = scalloc(sizeof(binding_t));
+ binding_t *binding = scalloc(1, sizeof(binding_t));
binding->input_code = val;
TAILQ_INSERT_TAIL(&(config.bindings), binding, bindings);
return 0;
}
+ if (!strcmp(cur_key, "tray_padding")) {
+ DLOG("tray_padding = %lld\n", val);
+ config.tray_padding = val;
+ return 1;
+ }
+
return 0;
}
FREE_COLOR(bar_fg);
FREE_COLOR(bar_bg);
FREE_COLOR(sep_fg);
+ FREE_COLOR(focus_bar_fg);
+ FREE_COLOR(focus_bar_bg);
+ FREE_COLOR(focus_sep_fg);
FREE_COLOR(active_ws_fg);
FREE_COLOR(active_ws_bg);
FREE_COLOR(active_ws_border);