feat: support stack layout config hot reload
This commit is contained in:
3
maomao.c
3
maomao.c
@@ -656,7 +656,6 @@ static Atom netatom[NetLast];
|
||||
|
||||
/* configuration, allows nested code to access above variables */
|
||||
#include "preset_config.h"
|
||||
#include "parse_config.h"
|
||||
|
||||
/* attempt to encapsulate suck into one file */
|
||||
#include "client.h"
|
||||
@@ -681,6 +680,8 @@ struct Pertag {
|
||||
static pid_t *autostart_pids;
|
||||
static size_t autostart_len;
|
||||
|
||||
#include "parse_config.h"
|
||||
|
||||
struct vec2 {
|
||||
double x, y;
|
||||
};
|
||||
|
||||
@@ -1210,6 +1210,8 @@ void parse_config(void) {
|
||||
|
||||
void reload_config(const Arg *arg) {
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
int i;
|
||||
Keyboard *kb;
|
||||
free_config();
|
||||
parse_config();
|
||||
@@ -1224,5 +1226,16 @@ void reload_config(const Arg *arg) {
|
||||
wl_list_for_each(kb, &keyboards, link) {
|
||||
wlr_keyboard_set_repeat_info(kb->wlr_keyboard, repeat_rate, repeat_delay);
|
||||
}
|
||||
|
||||
for (i = 0; i <= LENGTH(tags); i++) {
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
if (!m->wlr_output->enabled) {
|
||||
continue;
|
||||
}
|
||||
m->pertag->nmasters[i] = default_nmaster;
|
||||
m->pertag->mfacts[i] = default_mfact;
|
||||
m->pertag->smfacts[i] = default_smfact;
|
||||
}
|
||||
}
|
||||
arrange(selmon, false);
|
||||
}
|
||||
Reference in New Issue
Block a user