summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorAbhinav <abhinav.prsai@gmail.com>2025-05-31 13:12:32 +0100
committerAbhinav <abhinav.prsai@gmail.com>2025-05-31 13:12:32 +0100
commit3a1674608199a450f8dca541a80cce12334923e3 (patch)
treefc4fbd26de2430e2fe1b8afa9f0ba4a3dc01f19f /src/parser.c
parent17d90488c53326f2e52706d5dc2761799775b5e7 (diff)
added option for new windows to take focus
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c10
1 files changed, 9 insertions, 1 deletions
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 <X11/Xlib.h>
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <errno.h>
#include <X11/keysym.h>
#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++) {