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

@ -281,13 +281,7 @@ struct Barconfig {
M_MOD5 = 7
} modifier;
/** Command that should be run when mouse wheel up button is pressed over
* i3bar to override the default behavior. */
char *wheel_up_cmd;
/** Command that should be run when mouse wheel down button is pressed over
* i3bar to override the default behavior. */
char *wheel_down_cmd;
TAILQ_HEAD(mouse_commands_head, Mousecommand) mouse_commands;
/** Bar position (bottom by default). */
enum { P_BOTTOM = 0,
@ -353,6 +347,21 @@ struct Barconfig {
TAILQ_ENTRY(Barconfig) configs;
};
/**
* Defines a mouse command to be executed instead of the default behavior when
* clicking on the non-statusline part of i3bar.
*
*/
struct Mousecommand {
/** The button for this command (e.g., "button1") */
char *button;
/** The command which is to be executed for this button. */
char *command;
TAILQ_ENTRY(Mousecommand) commands;
};
/**
* Finds the configuration file to use (either the one specified by
* override_configpath), the users one or the system default) and calls