mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-29 07:58:21 -04:00
opt: allow bind multi action to one keybind
This commit is contained in:
parent
1863eb0182
commit
1d4138412a
5 changed files with 367 additions and 291 deletions
|
|
@ -29,7 +29,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
uint32_t mod;
|
||||
KeySymCode keysymcode;
|
||||
void (*func)(const Arg *);
|
||||
int (*func)(const Arg *);
|
||||
Arg arg;
|
||||
char mode[28];
|
||||
bool iscommonmode;
|
||||
|
|
@ -110,20 +110,20 @@ KeyBinding default_key_bindings[] = {CHVT(1), CHVT(2), CHVT(3), CHVT(4),
|
|||
typedef struct {
|
||||
unsigned int mod;
|
||||
unsigned int button;
|
||||
void (*func)(const Arg *);
|
||||
int (*func)(const Arg *);
|
||||
Arg arg;
|
||||
} MouseBinding;
|
||||
|
||||
typedef struct {
|
||||
unsigned int mod;
|
||||
unsigned int dir;
|
||||
void (*func)(const Arg *);
|
||||
int (*func)(const Arg *);
|
||||
Arg arg;
|
||||
} AxisBinding;
|
||||
|
||||
typedef struct {
|
||||
unsigned int fold;
|
||||
void (*func)(const Arg *);
|
||||
int (*func)(const Arg *);
|
||||
Arg arg;
|
||||
} SwitchBinding;
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ typedef struct {
|
|||
unsigned int mod;
|
||||
unsigned int motion;
|
||||
unsigned int fingers_count;
|
||||
void (*func)(const Arg *);
|
||||
int (*func)(const Arg *);
|
||||
Arg arg;
|
||||
} GestureBinding;
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ typedef struct {
|
|||
|
||||
} Config;
|
||||
|
||||
typedef void (*FuncType)(const Arg *);
|
||||
typedef int (*FuncType)(const Arg *);
|
||||
Config config;
|
||||
|
||||
void parse_config_file(Config *config, const char *file_path);
|
||||
|
|
@ -3032,7 +3032,8 @@ void reset_option(void) {
|
|||
arrange(selmon, false);
|
||||
}
|
||||
|
||||
void reload_config(const Arg *arg) {
|
||||
int reload_config(const Arg *arg) {
|
||||
parse_config();
|
||||
reset_option();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue