Implement i3's logic for maintaining a list of 'bindsym' directives and passing it to i3bar through the IPC.

This commit is contained in:
Ingo Bürk
2015-05-02 21:54:56 +02:00
parent ab12d3fc74
commit 2b6f76852c
4 changed files with 48 additions and 16 deletions

View File

@ -469,6 +469,19 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
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);
@ -549,15 +562,7 @@ static void dump_bar_config(yajl_gen gen, Barconfig *config) {
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)