applied jk_to_tab patch df74b26e
Anselm R.Garbe · 2006-08-15 08:25 3 file(s) · +60 −53
config.default.h +17 −17
18 18
#define KEYS \
19 19
static Key key[] = { \
20 20
	/* modifier			key		function	arguments */ \
21 -
	{ MODKEY,			XK_0,		view,		{ .i = 0 } }, \
22 -
	{ MODKEY,			XK_1,		view,		{ .i = 1 } }, \
23 -
	{ MODKEY,			XK_2,		view,		{ .i = 2 } }, \
24 -
	{ MODKEY,			XK_3,		view,		{ .i = 3 } }, \
25 -
	{ MODKEY,			XK_4,		view,		{ .i = 4 } }, \
26 -
	{ MODKEY,			XK_j,		focusnext,	{ 0 } }, \
27 -
	{ MODKEY,			XK_k,		focusprev,	{ 0 } }, \
28 -
	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
29 -
	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
21 +
	{ MODKEY|ShiftMask,		XK_Return,	spawn,		{ .cmd = "exec xterm" } }, \
22 +
	{ MODKEY,			XK_Tab,		focusnext,	{ 0 } }, \
23 +
	{ MODKEY|ShiftMask,		XK_Tab,		focusprev,	{ 0 } }, \
30 24
	{ MODKEY,			XK_Return,	zoom,		{ 0 } }, \
31 -
	{ MODKEY|ControlMask,		XK_0,		toggleview,	{ .i = 0 } }, \
32 -
	{ MODKEY|ControlMask,		XK_1,		toggleview,	{ .i = 1 } }, \
33 -
	{ MODKEY|ControlMask,		XK_2,		toggleview,	{ .i = 2 } }, \
34 -
	{ MODKEY|ControlMask,		XK_3,		toggleview,	{ .i = 3 } }, \
35 -
	{ MODKEY|ControlMask,		XK_4,		toggleview,	{ .i = 4 } }, \
25 +
	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
36 26
	{ MODKEY|ShiftMask,		XK_0,		tag,		{ .i = 0 } }, \
37 27
	{ MODKEY|ShiftMask,		XK_1,		tag,		{ .i = 1 } }, \
38 28
	{ MODKEY|ShiftMask,		XK_2,		tag,		{ .i = 2 } }, \
39 29
	{ MODKEY|ShiftMask,		XK_3,		tag,		{ .i = 3 } }, \
40 30
	{ MODKEY|ShiftMask,		XK_4,		tag,		{ .i = 4 } }, \
41 -
	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
42 -
	{ MODKEY|ShiftMask,		XK_q,		quit,		{ 0 } }, \
43 -
	{ MODKEY|ShiftMask,		XK_Return,	spawn,		{ .cmd = "exec xterm" } }, \
44 31
	{ MODKEY|ControlMask|ShiftMask,	XK_0,		toggletag,	{ .i = 0 } }, \
45 32
	{ MODKEY|ControlMask|ShiftMask,	XK_1,		toggletag,	{ .i = 1 } }, \
46 33
	{ MODKEY|ControlMask|ShiftMask,	XK_2,		toggletag,	{ .i = 2 } }, \
47 34
	{ MODKEY|ControlMask|ShiftMask,	XK_3,		toggletag,	{ .i = 3 } }, \
48 35
	{ MODKEY|ControlMask|ShiftMask,	XK_4,		toggletag,	{ .i = 4 } }, \
36 +
	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
37 +
	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
38 +
	{ MODKEY,			XK_0,		view,		{ .i = 0 } }, \
39 +
	{ MODKEY,			XK_1,		view,		{ .i = 1 } }, \
40 +
	{ MODKEY,			XK_2,		view,		{ .i = 2 } }, \
41 +
	{ MODKEY,			XK_3,		view,		{ .i = 3 } }, \
42 +
	{ MODKEY,			XK_4,		view,		{ .i = 4 } }, \
43 +
	{ MODKEY|ControlMask,		XK_0,		toggleview,	{ .i = 0 } }, \
44 +
	{ MODKEY|ControlMask,		XK_1,		toggleview,	{ .i = 1 } }, \
45 +
	{ MODKEY|ControlMask,		XK_2,		toggleview,	{ .i = 2 } }, \
46 +
	{ MODKEY|ControlMask,		XK_3,		toggleview,	{ .i = 3 } }, \
47 +
	{ MODKEY|ControlMask,		XK_4,		toggleview,	{ .i = 4 } }, \
48 +
	{ MODKEY|ShiftMask,		XK_q,		quit,		{ 0 } }, \
49 49
};
50 50
51 51
#define RULES \
dwm.1 +42 −34
46 46
to/from the view.
47 47
.SS Keyboard commands
48 48
.TP
49 -
.B Mod1-Return
50 -
Zoom current
51 -
.B window
52 -
to the 
53 -
.B master
54 -
column.
49 +
.B Mod1-Shift-Return
50 +
Start
51 +
.BR xterm (1).
55 52
.TP
56 -
.B Mod1-j
53 +
.B Mod1-Tab
57 54
Focus next
58 55
.BR window .
59 56
.TP
60 -
.B Mod1-k
57 +
.B Mod1-Shift-Tab
61 58
Focus previous
62 59
.BR window .
63 60
.TP
61 +
.B Mod1-Return
62 +
Zoom current
63 +
.B window
64 +
to the 
65 +
.B master
66 +
column
67 +
.RB ( tiling
68 +
mode only).
69 +
.TP
64 70
.B Mod1-m
65 71
Maximize current
66 72
.BR window .
67 73
.TP
68 -
.B Mod1-[0..n]
69 -
View all windows with
70 -
.BR "tag n" .
71 -
.TP
72 -
.B Mod1-space
73 -
Toggle between
74 -
.B tiled
75 -
and
76 -
.B floating
77 -
mode (affects
78 -
.BR "all windows" ).
79 -
.TP
80 74
.B Mod1-Shift-[0..n]
81 75
Apply
82 76
.B nth tag
83 77
to current
84 78
.BR window .
85 79
.TP
80 +
.B Mod1-Control-Shift-[0..n]
81 +
Add/remove
82 +
.B nth tag
83 +
to/from current
84 +
.BR window .
85 +
.TP
86 86
.B Mod1-Shift-c
87 87
Close focused
88 88
.B window.
89 89
.TP
90 -
.B Mod1-Shift-q
91 -
Quit
92 -
.B dwm.
90 +
.B Mod1-space
91 +
Toggle between
92 +
.B tiled
93 +
and
94 +
.B floating
95 +
mode (affects
96 +
.BR "all windows" ).
93 97
.TP
94 -
.B Mod1-Shift-Return
95 -
Start
96 -
.BR terminal .
98 +
.B Mod1-[0..n]
99 +
View all windows with
100 +
.BR "tag n" .
97 101
.TP
98 102
.B Mod1-Control-[0..n]
99 103
Add/remove all windows with
100 104
.B tag n
101 105
to/from the view.
102 106
.TP
103 -
.B Mod1-Control-Shift-[0..n]
104 -
Add/remove
105 -
.B nth tag
106 -
to/from current
107 -
.BR window .
107 +
.B Mod1-Shift-q
108 +
Quit
109 +
.B dwm.
108 110
.SS Mouse commands
109 111
.TP
110 112
.B Mod1-Button1
111 113
Move current
112 114
.B window
113 -
while dragging.
115 +
while dragging
116 +
.RB ( floating
117 +
mode only).
114 118
.TP
115 119
.B Mod1-Button2
116 120
Zoom current
117 121
.B window
118 122
to the 
119 123
.B master
120 -
column.
124 +
column
125 +
.RB ( tiling
126 +
mode only).
121 127
.TP
122 128
.B Mod1-Button3
123 129
Resize current
124 130
.B window
125 -
while dragging.
131 +
while dragging
132 +
.RB ( floating
133 +
mode only).
126 134
.SH CUSTOMIZATION
127 135
.B dwm
128 136
is customized by creating a custom config.h and (re)compiling the source
main.c +1 −2
291 291
					strcpy(stext, "broken pipe");
292 292
				drawstatus();
293 293
			}
294 -
			if(FD_ISSET(xfd, &rd))
295 -
				procevent();
296 294
		}
295 +
		procevent();
297 296
	}
298 297
	cleanup();
299 298
	XCloseDisplay(dpy);