From 6bc7851d3dc6da1443571ebffb24c13cfa0ae4c1 Mon Sep 17 00:00:00 2001 From: Jasper Spahl Date: Sat, 26 Mar 2022 19:17:21 +0100 Subject: [PATCH] config --- config.h | 24 ++++++++++++++++++++++++ config.mk | 2 +- drw.c | 13 ------------- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 config.h diff --git a/config.h b/config.h new file mode 100644 index 0000000..3d426f4 --- /dev/null +++ b/config.h @@ -0,0 +1,24 @@ +/* See LICENSE file for copyright and license details. */ +/* 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 const char *fonts[] = { + "monospace:size=10", + "JoyPixels:size=10" +}; +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *colors[SchemeLast][2] = { + /* fg bg */ + [SchemeNorm] = { "#bbbbbb", "#222222" }, + [SchemeSel] = { "#eeeeee", "#005577" }, + [SchemeOut] = { "#000000", "#00ffff" }, +}; +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +/* + * Characters not considered part of a word while deleting words + * for example: " /?\"&[]" + */ +static const char worddelimiters[] = " "; diff --git a/config.mk b/config.mk index 05d5a3e..1043beb 100644 --- a/config.mk +++ b/config.mk @@ -2,7 +2,7 @@ VERSION = 5.0 # paths -PREFIX = /usr/local +PREFIX = $(HOME).local MANPREFIX = $(PREFIX)/share/man X11INC = /usr/X11R6/include diff --git a/drw.c b/drw.c index 4cdbcbe..c1c265c 100644 --- a/drw.c +++ b/drw.c @@ -133,19 +133,6 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) die("no font specified."); } - /* Do not allow using color fonts. This is a workaround for a BadLength - * error from Xft with color glyphs. Modelled on the Xterm workaround. See - * https://bugzilla.redhat.com/show_bug.cgi?id=1498269 - * https://lists.suckless.org/dev/1701/30932.html - * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349 - * and lots more all over the internet. - */ - FcBool iscol; - if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) { - XftFontClose(drw->dpy, xfont); - return NULL; - } - font = ecalloc(1, sizeof(Fnt)); font->xfont = xfont; font->pattern = pattern;