Allow clicking and mousewheeling on the battery panel

This commit is the same as vimishor's original [*] except that I have
added middle-click and up/down mousewheel actions. In order to fix a
ftbs I also added guards to panel.c, panel.h & tint.c

The following configuration settings have been created :-

battery_lclick_command
battery_mclick_command
battery_rclick_command
battery_uwheel_command
battery_dwheel_command

[*] c78732c46a
This commit is contained in:
berkley4
2015-07-13 04:16:02 +01:00
parent e84d963ab6
commit fd78e6d886
6 changed files with 124 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ extern int percentage_hide;
extern int8_t battery_low_status;
extern char *battery_low_cmd;
extern char *battery_lclick_command;
extern char *battery_mclick_command;
extern char *battery_rclick_command;
extern char *battery_uwheel_command;
extern char *battery_dwheel_command;
// default global data
void default_battery();
@@ -71,4 +77,6 @@ void draw_battery(void *obj, cairo_t *c);
int resize_battery(void *obj);
void battery_action(int button);
#endif