y(map_close);
}
+static void dump_mouse_commands(yajl_gen gen, Barconfig *config) {
+ ystr("mouse_commands");
+ y(map_open);
+
+ struct Mousecommand *current;
+ TAILQ_FOREACH(current, &(config->mouse_commands), commands) {
+ ystr(current->button);
+ ystr(current->command);
+ }
+
+ y(map_close);
+}
+
static void dump_bar_config(yajl_gen gen, Barconfig *config) {
y(map_open);
break;
}
- if (config->wheel_up_cmd) {
- ystr("wheel_up_cmd");
- ystr(config->wheel_up_cmd);
- }
-
- if (config->wheel_down_cmd) {
- ystr("wheel_down_cmd");
- ystr(config->wheel_down_cmd);
- }
+ dump_mouse_commands(gen, config);
ystr("position");
if (config->position == P_BOTTOM)