[wiki] [sites] Include config.def.h and config.mk changes to dwm xft patch || Danil Semelenov
commit 1d2291e948a4d4a362c080e4610a7d5ab384130f
Author: Danil Semelenov <mail_AT_danil.mobi>
Date: Thu Sep 17 12:02:57 2015 +0300
Include config.def.h and config.mk changes to dwm xft patch
diff --git a/dwm.suckless.org/patches/dwm-6.0-xft.diff b/dwm.suckless.org/patches/dwm-6.0-xft.diff
index cae66bd..fe7fd89 100644
--- a/dwm.suckless.org/patches/dwm-6.0-xft.diff
+++ b/dwm.suckless.org/patches/dwm-6.0-xft.diff
_AT_@ -1,5 +1,35 @@
---- ../dwm-o/dwm-6.0/dwm.c 2011-12-19 10:02:46.000000000 -0500
-+++ dwm.c 2012-05-16 22:33:00.043394484 -0400
+diff --git a/config.def.h b/config.def.h
+index 77ff358..a355bf0 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -1,7 +1,7 @@
+ /* See LICENSE file for copyright and license details. */
+
+ /* appearance */
+-static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
++static const char font[] = "monospace-9";
+ static const char normbordercolor[] = "#444444";
+ static const char normbgcolor[] = "#222222";
+ static const char normfgcolor[] = "#bbbbbb";
+diff --git a/config.mk b/config.mk
+index 484554a..a09be79 100644
+--- a/config.mk
++++ b/config.mk
+_AT_@ -15,8 +15,8 @@ XINERAMALIBS = -L${X11LIB} -lXinerama
+ XINERAMAFLAGS = -DXINERAMA
+
+ # includes and libs
+-INCS = -I. -I/usr/include -I${X11INC}
+-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
++INCS = -I. -I/usr/include -I${X11INC} -I/usr/include/freetype2
++LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft
+
+ # flags
+ CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+diff --git a/dwm.c b/dwm.c
+index 1d78655..9587e77 100644
+--- a/dwm.c
++++ b/dwm.c
_AT_@ -39,6 +39,7 @@
#ifdef XINERAMA
#include <X11/extensions/Xinerama.h>
_AT_@ -8,7 +38,7 @@
/* macros */
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
-_AT_@ -99,16 +100,15 @@
+_AT_@ -99,16 +100,15 @@ struct Client {
typedef struct {
int x, y, w, h;
_AT_@ -28,7 +58,7 @@
} font;
} DC; /* draw context */
-_AT_@ -178,15 +178,15 @@
+_AT_@ -178,15 +178,15 @@ static void die(const char *errstr, ...);
static Monitor *dirtomon(int dir);
static void drawbar(Monitor *m);
static void drawbars(void);
_AT_@ -47,7 +77,7 @@
static Bool getrootptr(int *x, int *y);
static long getstate(Window w);
static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
-_AT_@ -485,10 +485,6 @@
+_AT_@ -485,10 +485,6 @@ cleanup(void) {
for(m = mons; m; m = m->next)
while(m->stack)
unmanage(m->stack, False);
_AT_@ -58,7 +88,7 @@
XUngrabKey(dpy, AnyKey, AnyModifier, root);
XFreePixmap(dpy, dc.drawable);
XFreeGC(dpy, dc.gc);
-_AT_@ -719,7 +715,7 @@
+_AT_@ -719,7 +715,7 @@ void
drawbar(Monitor *m) {
int x;
unsigned int i, occ = 0, urg = 0;
_AT_@ -67,7 +97,7 @@
Client *c;
for(c = m->clients; c; c = c->next) {
-_AT_@ -774,10 +770,10 @@
+_AT_@ -774,10 +770,10 @@ drawbars(void) {
}
void
_AT_@ -80,7 +110,7 @@
x = (dc.font.ascent + dc.font.descent + 2) / 4;
if(filled)
XFillRectangle(dpy, dc.drawable, dc.gc, dc.x+1, dc.y+1, x+1, x+1);
-_AT_@ -786,11 +782,12 @@
+_AT_@ -786,11 +782,12 @@ drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) {
}
void
_AT_@ -95,7 +125,7 @@
XFillRectangle(dpy, dc.drawable, dc.gc, dc.x, dc.y, dc.w, dc.h);
if(!text)
return;
-_AT_@ -805,11 +802,11 @@
+_AT_@ -805,11 +802,11 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
memcpy(buf, text, len);
if(len < olen)
for(i = len; i && i > len - 3; buf[--i] = '.');
_AT_@ -112,7 +142,7 @@
}
void
-_AT_@ -855,7 +852,7 @@
+_AT_@ -855,7 +852,7 @@ focus(Client *c) {
detachstack(c);
attachstack(c);
grabbuttons(c, True);
_AT_@ -121,7 +151,7 @@
setfocus(c);
}
else
-_AT_@ -926,14 +923,14 @@
+_AT_@ -926,14 +923,14 @@ getatomprop(Client *c, Atom prop) {
return atom;
}
_AT_@ -141,7 +171,7 @@
}
Bool
-_AT_@ -1034,35 +1031,13 @@
+_AT_@ -1034,35 +1031,13 @@ incnmaster(const Arg *arg) {
void
initfont(const char *fontstr) {
_AT_@ -183,7 +213,7 @@
dc.font.height = dc.font.ascent + dc.font.descent;
}
-_AT_@ -1144,7 +1119,7 @@
+_AT_@ -1144,7 +1119,7 @@ manage(Window w, XWindowAttributes *wa) {
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
_AT_@ -192,7 +222,7 @@
configure(c); /* propagates border_width, if size doesn't change */
updatewindowtype(c);
updatesizehints(c);
-_AT_@ -1621,8 +1596,6 @@
+_AT_@ -1621,8 +1596,6 @@ setup(void) {
dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen));
dc.gc = XCreateGC(dpy, root, 0, NULL);
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
_AT_@ -201,7 +231,7 @@
/* init bars */
updatebars();
updatestatus();
-_AT_@ -1692,13 +1665,9 @@
+_AT_@ -1692,13 +1665,9 @@ tagmon(const Arg *arg) {
int
textnw(const char *text, unsigned int len) {
_AT_@ -218,7 +248,7 @@
}
void
-_AT_@ -1776,7 +1745,7 @@
+_AT_@ -1776,7 +1745,7 @@ unfocus(Client *c, Bool setfocus) {
if(!c)
return;
grabbuttons(c, False);
diff --git a/dwm.suckless.org/patches/xft.md b/dwm.suckless.org/patches/xft.md
index 67e3262..67d5668 100644
--- a/dwm.suckless.org/patches/xft.md
+++ b/dwm.suckless.org/patches/xft.md
_AT_@ -11,6 +11,7 @@ Download
* [dwm-6.0-xft.diff](dwm-6.0-xft.diff) (6.6k) (16 May 2012)
* memory leak fixed and improved implementation.
+ * include config.def.h and config.mk changes.
Author
Received on Thu Sep 17 2015 - 11:03:28 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 17 2015 - 11:12:11 CEST