Merge pull request #1697 from Airblader/feature-1695
Extend mouse commands on i3bar
This commit is contained in:
@ -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(bar_bindings_head, Barbinding) bar_bindings;
|
||||
|
||||
/** 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 Barbinding {
|
||||
/** The button to be used (e.g., 1 for "button1"). */
|
||||
int input_code;
|
||||
|
||||
/** The command which is to be executed for this button. */
|
||||
char *command;
|
||||
|
||||
TAILQ_ENTRY(Barbinding) bindings;
|
||||
};
|
||||
|
||||
/**
|
||||
* Finds the configuration file to use (either the one specified by
|
||||
* override_configpath), the user’s one or the system default) and calls
|
||||
|
@ -80,6 +80,7 @@ CFGFUN(bar_verbose, const char *verbose);
|
||||
CFGFUN(bar_modifier, const char *modifier);
|
||||
CFGFUN(bar_wheel_up_cmd, const char *command);
|
||||
CFGFUN(bar_wheel_down_cmd, const char *command);
|
||||
CFGFUN(bar_bindsym, const char *button, const char *command);
|
||||
CFGFUN(bar_position, const char *position);
|
||||
CFGFUN(bar_i3bar_command, const char *i3bar_command);
|
||||
CFGFUN(bar_color, const char *colorclass, const char *border, const char *background, const char *text);
|
||||
@ -90,4 +91,5 @@ CFGFUN(bar_status_command, const char *command);
|
||||
CFGFUN(bar_binding_mode_indicator, const char *value);
|
||||
CFGFUN(bar_workspace_buttons, const char *value);
|
||||
CFGFUN(bar_strip_workspace_numbers, const char *value);
|
||||
CFGFUN(bar_start);
|
||||
CFGFUN(bar_finish);
|
||||
|
Reference in New Issue
Block a user