Skip to content

Commit 7b0e72f

Browse files
author
ChanderG
committed
move to dwm 6.1
also needs dmenu 6.1 which might have to be made from source
1 parent 1584020 commit 7b0e72f

File tree

10 files changed

+1267
-737
lines changed

10 files changed

+1267
-737
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
dwm
2-
dwm.o
2+
*.o

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
include config.mk
55

6-
SRC = dwm.c
6+
SRC = drw.c dwm.c util.c
77
OBJ = ${SRC:.c=.o}
88

99
all: options dwm
@@ -35,8 +35,8 @@ clean:
3535
dist: clean
3636
@echo creating dist tarball
3737
@mkdir -p dwm-${VERSION}
38-
@cp -R LICENSE Makefile README config.def.h config.mk \
39-
dwm.1 ${SRC} dwm-${VERSION}
38+
@cp -R LICENSE TODO BUGS Makefile README config.def.h config.mk \
39+
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
4040
@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
4141
@gzip dwm-${VERSION}.tar
4242
@rm -rf dwm-${VERSION}

config.def.h

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/* See LICENSE file for copyright and license details. */
22

33
/* appearance */
4-
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
4+
static const char *fonts[] = {
5+
"monospace:size=10"
6+
};
7+
static const char dmenufont[] = "monospace:size=10";
58
static const char normbordercolor[] = "#444444";
69
static const char normbgcolor[] = "#222222";
710
static const char normfgcolor[] = "#bbbbbb";
@@ -10,22 +13,26 @@ static const char selbgcolor[] = "#005577";
1013
static const char selfgcolor[] = "#eeeeee";
1114
static const unsigned int borderpx = 1; /* border pixel of windows */
1215
static const unsigned int snap = 32; /* snap pixel */
13-
static const Bool showbar = True; /* False means no bar */
14-
static const Bool topbar = True; /* False means bottom bar */
16+
static const int showbar = 1; /* 0 means no bar */
17+
static const int topbar = 1; /* 0 means bottom bar */
1518

1619
/* tagging */
1720
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
1821

1922
static const Rule rules[] = {
23+
/* xprop(1):
24+
* WM_CLASS(STRING) = instance, class
25+
* WM_NAME(STRING) = title
26+
*/
2027
/* class instance title tags mask isfloating monitor */
21-
{ "Gimp", NULL, NULL, 0, True, -1 },
22-
{ "Firefox", NULL, NULL, 1 << 8, False, -1 },
28+
{ "Gimp", NULL, NULL, 0, 1, -1 },
29+
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
2330
};
2431

2532
/* layout(s) */
26-
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
27-
static const int nmaster = 1; /* number of clients in master area */
28-
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
33+
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
34+
static const int nmaster = 1; /* number of clients in master area */
35+
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
2936

3037
static const Layout layouts[] = {
3138
/* symbol arrange function */
@@ -46,8 +53,9 @@ static const Layout layouts[] = {
4653
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
4754

4855
/* commands */
49-
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
50-
static const char *termcmd[] = { "uxterm", NULL };
56+
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
57+
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
58+
static const char *termcmd[] = { "st", NULL };
5159

5260
static Key keys[] = {
5361
/* modifier key function argument */

config.h

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/* See LICENSE file for copyright and license details. */
22

33
/* appearance */
4-
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
4+
static const char *fonts[] = {
5+
"monospace:size=10"
6+
};
7+
static const char dmenufont[] = "monospace:size=10";
58
static const char normbordercolor[] = "#444444";
69
static const char normbgcolor[] = "#222222";
710
static const char normfgcolor[] = "#bbbbbb";
@@ -10,23 +13,27 @@ static const char selbgcolor[] = "#005577";
1013
static const char selfgcolor[] = "#eeeeee";
1114
static const unsigned int borderpx = 1; /* border pixel of windows */
1215
static const unsigned int snap = 32; /* snap pixel */
13-
static const Bool showbar = True; /* False means no bar */
14-
static const Bool topbar = True; /* False means bottom bar */
16+
static const int showbar = 1; /* 0 means no bar */
17+
static const int topbar = 1; /* 0 means bottom bar */
1518

1619
/* tagging */
1720
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
1821

1922
static const Rule rules[] = {
23+
/* xprop(1):
24+
* WM_CLASS(STRING) = instance, class
25+
* WM_NAME(STRING) = title
26+
*/
2027
/* class instance title tags mask isfloating monitor */
21-
{ "Gimp", NULL, NULL, 0, True, -1 },
22-
{ "Firefox", NULL, NULL, 1 << 0, False, -1 },
28+
{ "Gimp", NULL, NULL, 0, 1, -1 },
29+
{ "Firefox", NULL, NULL, 1 << 0, 0, -1 },
2330
};
2431

2532
/* layout(s) */
26-
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
27-
static const int nmaster = 1; /* number of clients in master area */
28-
/* False to take care of "empty space around terminals" problem */
29-
static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
33+
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
34+
static const int nmaster = 1; /* number of clients in master area */
35+
// needs to be 0 to solve ugly spacing issues
36+
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
3037

3138
static const Layout layouts[] = {
3239
/* symbol arrange function */
@@ -47,25 +54,27 @@ static const Layout layouts[] = {
4754
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
4855

4956
/* commands */
50-
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
57+
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
58+
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
59+
static const char *termcmd[] = { "st", NULL };
5160

52-
// misc
61+
// urxvt
62+
static const char *utermcmd[] = { "urxvt", NULL };
63+
// firefox
5364
static const char *ffcmd[] = { "firefox", NULL };
54-
static const char *termcmd[] = { "urxvt", NULL };
55-
5665
// dropdown terminal with tmux - https://github.com/noctuid/tdrop
5766
static const char *termdropcmd[] = { "tdrop", "-a", "-s", "dropdown", "urxvt", NULL };
5867

59-
// note that konsole and gnome-terminal are mapped to the same key
6068
static Key keys[] = {
6169
/* modifier key function argument */
6270
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
63-
//misc
71+
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
72+
// firefox
6473
{ MODKEY|ShiftMask, XK_f, spawn, {.v = ffcmd } },
65-
{ MODKEY|ShiftMask, XK_u, spawn, {.v = termcmd } },
74+
// urxvt
75+
{ MODKEY|ShiftMask, XK_u, spawn, {.v = utermcmd } },
6676
// drop down terminal
6777
{ MODKEY, XK_o, spawn, {.v = termdropcmd } },
68-
//others
6978
{ MODKEY, XK_b, togglebar, {0} },
7079
{ MODKEY, XK_j, focusstack, {.i = +1 } },
7180
{ MODKEY, XK_k, focusstack, {.i = -1 } },

config.mk

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dwm version
2-
VERSION = 6.0
2+
VERSION = 6.1
33

44
# Customize below to fit your system
55

@@ -10,20 +10,25 @@ MANPREFIX = ${PREFIX}/share/man
1010
X11INC = /usr/X11R6/include
1111
X11LIB = /usr/X11R6/lib
1212

13-
# Xinerama
14-
XINERAMALIBS = -L${X11LIB} -lXinerama
13+
# Xinerama, comment if you don't want it
14+
XINERAMALIBS = -lXinerama
1515
XINERAMAFLAGS = -DXINERAMA
1616

17+
# freetype
18+
FREETYPELIBS = -lfontconfig -lXft
19+
FREETYPEINC = /usr/include/freetype2
20+
# OpenBSD (uncomment)
21+
#FREETYPEINC = ${X11INC}/freetype2
22+
1723
# includes and libs
18-
INCS = -I. -I/usr/include -I${X11INC}
19-
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
24+
INCS = -I${X11INC} -I${FREETYPEINC}
25+
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
2026

2127
# flags
22-
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
23-
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
24-
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
25-
#LDFLAGS = -g ${LIBS}
26-
LDFLAGS = -s ${LIBS}
28+
CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
29+
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
30+
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
31+
LDFLAGS = -s ${LIBS}
2732

2833
# Solaris
2934
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"

0 commit comments

Comments
 (0)