diff --git a/maomao.c b/maomao.c index 8dae81f..bf770b0 100644 --- a/maomao.c +++ b/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; }; diff --git a/parse_config.h b/parse_config.h index 6e40a02..449cf14 100644 --- a/parse_config.h +++ b/parse_config.h @@ -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); } \ No newline at end of file