diff options
| author | uint23 <72694427+uint23@users.noreply.github.com> | 2025-05-29 16:28:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 16:28:47 +0100 |
| commit | 556d02be86bf0c85cdd092fb13701d65417ab721 (patch) | |
| tree | 9e38b2f313d765dd9446a2afcc5f7f8a14b502d6 /src/parser.c | |
| parent | 8e6309383edd8f8d78c40620a697d48831cd9b44 (diff) | |
| parent | 39798d62d31f930fcf8b58af951010b077c5ce47 (diff) | |
Merge branch 'main' into main
Diffstat (limited to 'src/parser.c')
| -rw-r--r-- | src/parser.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/parser.c b/src/parser.c index 85b6d20..c2c6e23 100644 --- a/src/parser.c +++ b/src/parser.c @@ -33,14 +33,6 @@ static const struct { static void remap_and_dedupe_binds(Config *cfg) { for (int i = 0; i < cfg->bindsn; i++) { - Binding *b = &cfg->binds[i]; - if (b->mods & (Mod1Mask | Mod4Mask)) { - unsigned others = b->mods & ~(Mod1Mask | Mod4Mask); - b->mods = others | cfg->modkey; - } - } - - for (int i = 0; i < cfg->bindsn; i++) { for (int j = i + 1; j < cfg->bindsn; j++) { if (cfg->binds[i].mods == cfg->binds[j].mods && cfg->binds[i].keysym == cfg->binds[j].keysym) { memmove(&cfg->binds[j], &cfg->binds[j + 1], sizeof(Binding) * (cfg->bindsn - j - 1)); @@ -168,6 +160,7 @@ int parser(Config *cfg) found: if (0) { } // label followed by declaration is a C23 extension + FILE *f = fopen(path, "r"); if (!f) { fprintf(stderr, "sxwmrc: cannot open %s\n", path); @@ -223,7 +216,10 @@ found: cfg->border_swap_col = parse_col(rest); } else if (!strcmp(key, "master_width")) { - cfg->master_width = atoi(rest) / 100.0f; + float mf = atoi(rest) / 100.0f; + for (int i = 0; i < MAX_MONITORS; i++) { + cfg->master_width[i] = mf; + } } else if (!strcmp(key, "motion_throttle")) { cfg->motion_throttle = atoi(rest); |
