From e9dc2639a3f4a3c9dc8b085bcffe63cee73f8242 Mon Sep 17 00:00:00 2001 From: Jakub Trzeciak Date: Mon, 11 Sep 2023 17:32:23 +0200 Subject: Xresources Patch --- config.def.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 1edb647..298e91a 100644 --- a/config.def.h +++ b/config.def.h @@ -2,16 +2,25 @@ /* Default settings; can be overriden by command line. */ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ + /* -fn option overrides fonts[0]; default X11 font or font set */ +static char font[] = "monospace:size=10"; static const char *fonts[] = { - "monospace:size=10" + font, + "monospace:size=10", }; -static const char *prompt = NULL; /* -p option; prompt to the left of input field */ -static const char *colors[SchemeLast][2] = { + +static char *prompt = NULL; /* -p option; prompt to the left of input field */ + +static char normfgcolor[] = "#bbbbbb"; +static char normbgcolor[] = "#222222"; +static char selfgcolor[] = "#eeeeee"; +static char selbgcolor[] = "#005577"; +static char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { "#bbbbbb", "#222222" }, - [SchemeSel] = { "#eeeeee", "#005577" }, - [SchemeOut] = { "#000000", "#00ffff" }, + [SchemeNorm] = { normfgcolor, normbgcolor }, + [SchemeSel] = { selfgcolor, selbgcolor }, + [SchemeOut] = { "#000000", "#00ffff" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ static unsigned int lines = 0; @@ -21,3 +30,15 @@ static unsigned int lines = 0; * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; + +/* + * Xresources preferences to load at startup + */ +ResourcePref resources[] = { + { "font", STRING, &font }, + { "normfgcolor", STRING, &normfgcolor }, + { "normbgcolor", STRING, &normbgcolor }, + { "selfgcolor", STRING, &selfgcolor }, + { "selbgcolor", STRING, &selbgcolor }, + { "prompt", STRING, &prompt }, +}; -- cgit v1.2.3