From 3a1674608199a450f8dca541a80cce12334923e3 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Sat, 31 May 2025 13:12:32 +0100 Subject: added option for new windows to take focus --- src/parser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index 6bf1294..5dfb0f7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,11 +1,11 @@ #define _POSIX_C_SOURCE 200809L +#include #include #include #include #include #include #include -#include #include #include "parser.h" @@ -212,6 +212,14 @@ found:; // label followed by declaration is a C23 extension else if (!strcmp(key, "swap_border_colour")) { cfg->border_swap_col = parse_col(rest); } + else if (!strcmp(key, "new_win_focus")) { + if (!strcmp(rest, "true")) { + cfg->new_win_focus = True; + } + else { + cfg->new_win_focus = False; + } + } else if (!strcmp(key, "master_width")) { float mf = atoi(rest) / 100.0f; for (int i = 0; i < MAX_MONITORS; i++) { -- cgit v1.2.3