summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorJakub Trzeciak <jptrzy@gmail.com>2023-09-11 17:32:23 +0200
committerJakub Trzeciak <jptrzy@gmail.com>2023-09-11 17:32:23 +0200
commite9dc2639a3f4a3c9dc8b085bcffe63cee73f8242 (patch)
treebf0f793b9a417af3ef65ee9622cf6d2819070b92 /config.def.h
parent7ab0cb5ef0e19352fc5d64ae0d57a5cf4540acbf (diff)
downloaddmenu-e9dc2639a3f4a3c9dc8b085bcffe63cee73f8242.tar.gz
dmenu-e9dc2639a3f4a3c9dc8b085bcffe63cee73f8242.tar.bz2
dmenu-e9dc2639a3f4a3c9dc8b085bcffe63cee73f8242.zip
Xresources Patch
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h33
1 files changed, 27 insertions, 6 deletions
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 },
+};
Software created with 💖