From f0621ca8731abbd9e332b7b3efb8e985f09a29c6 Mon Sep 17 00:00:00 2001 From: speediegq Date: Thu, 18 Aug 2022 22:16:43 +0200 Subject: [PATCH] Add .Xresources toggle --- options.h | 3 +++ x.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/options.h b/options.h index 18d0b25..91055c9 100644 --- a/options.h +++ b/options.h @@ -215,3 +215,6 @@ char *termname = "st-256color"; /* $TERM value */ /* Tab space options */ unsigned int tabspaces = 8; + +/* Misc */ +#define USEXRESOURCES /* Use .Xresources. Comment this line if you do not want .Xresources support. */ diff --git a/x.c b/x.c index a0dfd7e..cc23366 100644 --- a/x.c +++ b/x.c @@ -92,7 +92,11 @@ static void ttysend(const Arg *); #include "options.h" /* include user configuration */ #include "char.h" /* include misc chars */ + +#ifdef USEXRESOURCES #include "xresources.h" /* include .xresources/xrdb options */ +#endif + #include "keybinds.h" /* include keybinds */ #include "mouse.h" /* include mouse binds */ #include "mapped.h" /* include list of mapped keys */ @@ -2745,8 +2749,10 @@ config_init(void) return; db = XrmGetStringDatabase(resm); + #ifdef USEXRESOURCES for (p = resources; p < resources + LEN(resources); p++) resource_load(db, p->name, p->type, p->dst); + #endif } void