forked from speedie/spmenu
Add option to always use insert mode for binds.conf
This commit is contained in:
parent
b06ea39b11
commit
63229604e7
|
@ -533,7 +533,6 @@ void readargs(int argc, char *argv[]) {
|
||||||
#if !USEWAYLAND
|
#if !USEWAYLAND
|
||||||
protocol = 0;
|
protocol = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (casesensitive) {
|
if (casesensitive) {
|
||||||
fstrncmp = strncmp;
|
fstrncmp = strncmp;
|
||||||
fstrstr = strstr;
|
fstrstr = strstr;
|
||||||
|
|
|
@ -132,6 +132,7 @@ int bind_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
config_setting_lookup_int(conf, "ignoreglobalkeys", &sp.ignoreglobalkeys);
|
config_setting_lookup_int(conf, "ignoreglobalkeys", &sp.ignoreglobalkeys);
|
||||||
|
config_setting_lookup_int(conf, "forceinsertmode", &sp.forceinsertmode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
spmenu.c
7
spmenu.c
|
@ -136,6 +136,7 @@ struct sp {
|
||||||
int ignoreglobalkeys; // should be set in the config file, if 1, the Keys keys array is ignored
|
int ignoreglobalkeys; // should be set in the config file, if 1, the Keys keys array is ignored
|
||||||
int ignoreconfmouse; // same for mouse
|
int ignoreconfmouse; // same for mouse
|
||||||
int ignoreglobalmouse; // same for mouse
|
int ignoreglobalmouse; // same for mouse
|
||||||
|
int forceinsertmode;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mo {
|
struct mo {
|
||||||
|
@ -512,6 +513,12 @@ void set_mode(void) {
|
||||||
|
|
||||||
sp_strncpy(tx.modetext, normtext, sizeof(tx.modetext));
|
sp_strncpy(tx.modetext, normtext, sizeof(tx.modetext));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sp.forceinsertmode) {
|
||||||
|
sp.mode = 1;
|
||||||
|
sp.allowkeys = !sp.mode;
|
||||||
|
hidemode = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle(void) {
|
void handle(void) {
|
||||||
|
|
Loading…
Reference in a new issue