Implement i3's logic for maintaining a list of 'bindsym' directives and passing it to i3bar through the IPC.
This commit is contained in:
23
src/ipc.c
23
src/ipc.c
@ -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)
|
||||
|
Reference in New Issue
Block a user