mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
增加配置重载
This commit is contained in:
parent
38138d6ec0
commit
1d58841bfd
3 changed files with 9 additions and 1 deletions
|
|
@ -30,4 +30,5 @@ void incnmaster(const Arg *arg);
|
||||||
void incgaps(const Arg *arg);
|
void incgaps(const Arg *arg);
|
||||||
void focusmon(const Arg *arg);
|
void focusmon(const Arg *arg);
|
||||||
void focusstack(const Arg *arg);
|
void focusstack(const Arg *arg);
|
||||||
void chvt(const Arg *arg);
|
void chvt(const Arg *arg);
|
||||||
|
void reload_config(const Arg *arg);
|
||||||
5
maomao.c
5
maomao.c
|
|
@ -4452,6 +4452,11 @@ void parse_config(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reload_config(const Arg *arg) {
|
||||||
|
free_config();
|
||||||
|
parse_config();
|
||||||
|
}
|
||||||
|
|
||||||
void setup(void) {
|
void setup(void) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,8 @@ FuncType parse_func_name(char *func_name,Arg *arg, char *arg_value) {
|
||||||
func = viewtoleft_have_client;
|
func = viewtoleft_have_client;
|
||||||
} else if (strcmp(func_name, "viewtoright_have_client") == 0) {
|
} else if (strcmp(func_name, "viewtoright_have_client") == 0) {
|
||||||
func = viewtoright_have_client;
|
func = viewtoright_have_client;
|
||||||
|
} else if (strcmp(func_name, "reload_config") == 0) {
|
||||||
|
func = reload_config;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue