summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h3
-rw-r--r--drw.c15
2 files changed, 17 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 6f3b2b4..61cea3e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -19,7 +19,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
-static const char *fonts[] = { "monospace:size=10", "JoyPixels:pixelsize=10:antialias=true:autohint=true" };
+static const char *fonts[] = { "Inconsolata Nerd Font Mono:Style=Regular:size=16:autohint=true", "JoyPixels:pixelsize=10:antialias=true:autohint=true" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
@@ -115,6 +115,7 @@ static const Key keys[] = {
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("/usr/bin/pamixer -i 5;kill -44 $(pidof dwmblocks)") },
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("/usr/bin/xbacklight -inc 5;kill -40 $(pidof dwmblocks)") },
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("/usr/bin/xbacklight -dec 5;kill -40 $(pidof dwmblocks)") },
+ { 0, XF86XK_Search, spawn, SHCMD("$BROWSER") },
{ 0, XK_Print, spawn, SHCMD("scrot -e 'mv $f ~/Pictures/Screenshots/'") },
};
diff --git a/drw.c b/drw.c
index a58a2b4..87b98dc 100644
--- a/drw.c
+++ b/drw.c
@@ -133,6 +133,21 @@ 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;