renamed monocle into maxmise, documented the keybindings in dwm(1) 39af3c26
anselm@anselm1 · 2008-03-04 21:40 3 file(s) · +31 −23
config.def.h +7 −5
11 11
#define SELBGCOLOR		"#0066ff"
12 12
#define SELFGCOLOR		"#ffffff"
13 13
14 -
/* old */
15 -
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
14 +
/* tagging */
15 +
const char tags[][MAXLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
16 16
17 17
Rule rules[] = {
18 18
	/* class:instance:title substr	tags ref	isfloating */
26 26
#define MWFACT			0.6	/* master width factor [0.1 .. 0.9] */
27 27
#define RESIZEHINTS		True	/* False - respect size hints in tiled resizals */
28 28
#define SNAP			32	/* snap pixel */
29 +
29 30
Layout layouts[] = {
30 31
	/* symbol		function */
31 32
	{ "[]=",		tile }, /* first entry is default */
32 33
	{ "><>",		floating },
33 -
	{ "[M]",		monocle },
34 +
	{ "[M]",		maximise },
34 35
};
35 36
36 37
/* key definitions */
40 41
	{ MODKEY,			XK_p,		spawn,
41 42
		"exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" },
42 43
	{ MODKEY|ShiftMask,		XK_Return,	spawn, "exec uxterm" },
43 -
	{ MODKEY,			XK_space,	setlayout,	NULL },
44 44
	{ MODKEY,			XK_b,		togglebar,	NULL },
45 +
	{ MODKEY,			XK_t,		setlayout,	"[]=" },
46 +
	{ MODKEY,			XK_f,		setlayout,	"><>" },
47 +
	{ MODKEY,			XK_m	,	setlayout,	"[M]" },
45 48
	{ MODKEY,			XK_j,		focusnext,	NULL },
46 49
	{ MODKEY,			XK_k,		focusprev,	NULL },
47 50
	{ MODKEY,			XK_h,		setmwfact,	"-0.05" },
48 51
	{ MODKEY,			XK_l,		setmwfact,	"+0.05" },
49 52
	{ MODKEY,			XK_r,		reapply,	NULL },
50 -
	{ MODKEY,			XK_m,		setlayout,	"[M]" },
51 53
	{ MODKEY,			XK_Return,	zoom,		NULL },
52 54
	{ MODKEY,			XK_Tab,		viewprevtag,	NULL },
53 55
	{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL },
dwm.1 +19 −12
5 5
.B dwm
6 6
.RB [ \-v ]
7 7
.SH DESCRIPTION
8 -
dwm is a dynamic window manager for X. It manages windows in tiled and
9 -
floating layouts. Either layout can be applied dynamically, optimizing the
8 +
dwm is a dynamic window manager for X. It manages windows in tiled, maximised
9 +
and floating layouts. Either layout can be applied dynamically, optimising the
10 10
environment for the application in use and the task performed.
11 11
.P
12 12
In tiled layout windows are managed in a master and stacking area. The master
13 13
area contains the window which currently needs most attention, whereas the
14 -
stacking area contains all other windows. In floating layout windows can be
15 -
resized and moved freely. Dialog windows are always managed floating,
16 -
regardless of the layout applied.
14 +
stacking area contains all other windows. In maximised layout all windows are
15 +
maximised to the screen size. In floating layout windows can be resized and
16 +
moved freely. Dialog windows are always managed floating, regardless of the
17 +
layout applied.
17 18
.P
18 19
Windows are grouped by tags. Each window can be tagged with one or multiple
19 20
tags. Selecting certain tags displays all windows with these tags.
20 21
.P
21 22
dwm contains a small status bar which displays all available tags, the layout,
22 23
the title of the focused window, and the text read from standard input. A
23 -
floating window is indicated with an empty square and a maximized
24 +
floating window is indicated with an empty square and a maximised
24 25
floating window is indicated with a filled square before the windows
25 26
title.  The selected tags are indicated with a different color. The tags of
26 27
the focused window are indicated with a filled square in the top left
62 63
.B Mod1\-Tab
63 64
Toggles to the previously selected tags.
64 65
.TP
66 +
.B Mod1\-t
67 +
Applies tiled layout.
68 +
.TP
69 +
.B Mod1\-f
70 +
Applies loating layout.
71 +
.TP
72 +
.B Mod1\-m
73 +
Applies maximised layout.
74 +
.TP
75 +
.B Mod1\-space
76 +
Toggles between layouts.
77 +
.TP
65 78
.B Mod1\-b
66 79
Shows/hides the status bar.
67 80
.TP
76 89
.TP
77 90
.B Mod1\-l
78 91
Increases the master area width about 5% (tiled layout only).
79 -
.TP
80 -
.B Mod1\-m
81 -
Maximizes current window (floating layout/window only).
82 92
.TP
83 93
.B Mod1\-r
84 94
Re-applies tagging rules to all windows.
98 108
.TP
99 109
.B Mod1\-Shift\-c
100 110
Close focused window.
101 -
.TP
102 -
.B Mod1\-space
103 -
Toggle between tiled and floating layout (affects all windows).
104 111
.TP
105 112
.B Mod1\-Shift\-space
106 113
Toggle focused window between tiled and floating state.
dwm.c +5 −6
48 48
#define BUTTONMASK		(ButtonPressMask|ButtonReleaseMask)
49 49
#define CLEANMASK(mask)		(mask & ~(numlockmask|LockMask))
50 50
#define LENGTH(x)		(sizeof x / sizeof x[0])
51 -
#define MAXTAGLEN		16
51 +
#define MAXLEN			16
52 52
#define MOUSEMASK		(BUTTONMASK|PointerMotionMask)
53 53
54 54
153 153
void manage(Window w, XWindowAttributes *wa);
154 154
void mappingnotify(XEvent *e);
155 155
void maprequest(XEvent *e);
156 -
void monocle(void);
156 +
void maximise(void);
157 157
void movemouse(Client *c);
158 158
Client *nexttiled(Client *c);
159 159
void propertynotify(XEvent *e);
1073 1073
}
1074 1074
1075 1075
void
1076 -
monocle(void) {
1076 +
maximise(void) {
1077 1077
	Client *c;
1078 1078
1079 1079
	domwfact = dozoom = False;
1080 -
	for(c = clients; c; c = c->next)
1081 -
		if(isvisible(c))
1082 -
			resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
1080 +
	for(c = nexttiled(clients); c; c = nexttiled(c->next))
1081 +
		resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
1083 1082
}
1084 1083
1085 1084
void