about summary refs log tree commit diff stats
path: root/Makefile
blob: 44bfa4f786f6099f3a40338a024faf85374e6202 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# dwm - dynamic window manager
# © 2006-2007 Anselm R. Garbe, Sander van Dijk

include config.mk

SRC = dwm.c
OBJ = ${SRC:.c=.o}

all: options dwm

options:
	@echo dwm build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

.c.o:
	@echo CC $<
	@${CC} -c ${CFLAGS} $<

${OBJ}: config.h config.mk

config.h:
	@echo creating $@ from config.def.h
	@cp config.def.h $@

dwm: ${OBJ}
	@echo CC -o $@
	@${CC} -o $@ ${OBJ} ${LDFLAGS}

clean:
	@echo cleaning
	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz

dist: clean
	@echo creating dist tarball
	@mkdir -p dwm-${VERSION}
	@cp -R LICENSE Makefile README config.def.h config.mk \
		dwm.1 ${SRC} dwm-${VERSION}
	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
	@gzip dwm-${VERSION}.tar
	@rm -rf dwm-${VERSION}

install: all
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f dwm ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	@sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1

uninstall:
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
	@rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1

.PHONY: all options clean dist install uninstall
span class="k">B Mod1\-Tab Toggles to the previously selected tags. .TP .B Mod1\-Shift\-[1..n] Apply .RB nth tag to focused window. .TP .B Mod1\-Shift\-0 Apply all tags to focused window. .TP .B Mod1\-Control\-Shift\-[1..n] Add/remove .B nth tag to/from focused window. .TP .B Mod1\-[1..n] View all windows with .BR nth tag. .TP .B Mod1\-0 View all windows with any tag. .TP .B Mod1\-Control\-[1..n] Add/remove all windows with .BR nth tag to/from the view. .TP .B Mod1\-Shift\-q Quit dwm. .SS Mouse commands .TP .B Mod1\-Button1 Move focused window while dragging. Tiled windows will be toggled to the floating state. .TP .B Mod1\-Button2 Toggles focused window between floating and tiled state. .TP .B Mod1\-Button3 Resize focused window while dragging. Tiled windows will be toggled to the floating state. .SH CUSTOMIZATION dwm is customized by creating a custom config.h and (re)compiling the source code. This keeps it fast, secure and simple. .SH SEE ALSO .BR dmenu (1) .SH BUGS Java applications which use the XToolkit/XAWT backend may draw grey windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround you can use JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or you can set the following environment variable (to use the older Motif backend instead): .BR AWT_TOOLKIT=MToolkit . .P GTK 2.10.9+ versions contain a broken .BR Save\-As file dialog implementation, which requests to reconfigure its window size in an endless loop. However, its window is still respondable during this state, so you can simply ignore the flicker until a new GTK version appears, which will fix this bug, approximately GTK 2.10.12+ versions.