i3bar: implement custom mouse wheel commands
Users can specify a command to run when a button was pressed on i3bar to override the default behavior. Currently only the mouse wheel buttons are supported. This is useful for disabling the scroll wheel action or running scripts that implement custom behavior for these buttons. Example: bar { wheel_up_cmd nop wheel_down_cmd exec ~/.i3/scripts/custom_wheel_down } fixes #1104
This commit is contained in:
committed by
Michael Stapelberg
parent
0514be8d4b
commit
8e23dc881b
@ -261,6 +261,14 @@ 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;
|
||||
|
||||
/** Bar position (bottom by default). */
|
||||
enum { P_BOTTOM = 0,
|
||||
P_TOP = 1 } position;
|
||||
|
Reference in New Issue
Block a user