summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-15 08:25:11 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-15 08:25:11 +0200
commitdf74b26e5dfa3ae0f3f66107a562be6ac46ee0c3 (patch)
treec928435463fcc7d8f807644d2596d2325fcdaec3
parentchanged main event loop (diff)
downloaddwm-df74b26e5dfa3ae0f3f66107a562be6ac46ee0c3.tar.gz
dwm-df74b26e5dfa3ae0f3f66107a562be6ac46ee0c3.zip
applied jk_to_tab patch
-rw-r--r--config.default.h34
-rw-r--r--dwm.176
-rw-r--r--main.c3
3 files changed, 60 insertions, 53 deletions
diff --git a/config.default.h b/config.default.h
index 44f0daf..9d99794 100644
--- a/config.default.h
+++ b/config.default.h
@@ -18,34 +18,34 @@ const char *tags[] = { "0", "1", "2", "3", "4", NULL };
18#define KEYS \ 18#define KEYS \
19static Key key[] = { \ 19static Key key[] = { \
20 /* modifier key function arguments */ \ 20 /* modifier key function arguments */ \
21 { MODKEY, XK_0, view, { .i = 0 } }, \ 21 { MODKEY|ShiftMask, XK_Return, spawn, { .cmd = "exec xterm" } }, \
22 { MODKEY, XK_1, view, { .i = 1 } }, \ 22 { MODKEY, XK_Tab, focusnext, { 0 } }, \
23 { MODKEY, XK_2, view, { .i = 2 } }, \ 23 { MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \
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 } }, \
30 { MODKEY, XK_Return, zoom, { 0 } }, \ 24 { MODKEY, XK_Return, zoom, { 0 } }, \
31 { MODKEY|ControlMask, XK_0, toggleview, { .i = 0 } }, \ 25 { MODKEY, XK_m, togglemax, { 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 } }, \
36 { MODKEY|ShiftMask, XK_0, tag, { .i = 0 } }, \ 26 { MODKEY|ShiftMask, XK_0, tag, { .i = 0 } }, \
37 { MODKEY|ShiftMask, XK_1, tag, { .i = 1 } }, \ 27 { MODKEY|ShiftMask, XK_1, tag, { .i = 1 } }, \
38 { MODKEY|ShiftMask, XK_2, tag, { .i = 2 } }, \ 28 { MODKEY|ShiftMask, XK_2, tag, { .i = 2 } }, \
39 { MODKEY|ShiftMask, XK_3, tag, { .i = 3 } }, \ 29 { MODKEY|ShiftMask, XK_3, tag, { .i = 3 } }, \
40 { MODKEY|ShiftMask, XK_4, tag, { .i = 4 } }, \ 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 { MODKEY|ControlMask|ShiftMask, XK_0, toggletag, { .i = 0 } }, \ 31 { MODKEY|ControlMask|ShiftMask, XK_0, toggletag, { .i = 0 } }, \
45 { MODKEY|ControlMask|ShiftMask, XK_1, toggletag, { .i = 1 } }, \ 32 { MODKEY|ControlMask|ShiftMask, XK_1, toggletag, { .i = 1 } }, \
46 { MODKEY|ControlMask|ShiftMask, XK_2, toggletag, { .i = 2 } }, \ 33 { MODKEY|ControlMask|ShiftMask, XK_2, toggletag, { .i = 2 } }, \
47 { MODKEY|ControlMask|ShiftMask, XK_3, toggletag, { .i = 3 } }, \ 34 { MODKEY|ControlMask|ShiftMask, XK_3, toggletag, { .i = 3 } }, \
48 { MODKEY|ControlMask|ShiftMask, XK_4, toggletag, { .i = 4 } }, \ 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#define RULES \ 51#define RULES \
diff --git a/dwm.1 b/dwm.1
index c653b99..46f0d94 100644
--- a/dwm.1
+++ b/dwm.1
@@ -46,83 +46,91 @@ click on a tag label adds/removes all windows with that
46to/from the view. 46to/from the view.
47.SS Keyboard commands 47.SS Keyboard commands
48.TP 48.TP
49.B Mod1-Return 49.B Mod1-Shift-Return
50Zoom current 50Start
51.B window 51.BR xterm (1).
52to the
53.B master
54column.
55.TP 52.TP
56.B Mod1-j 53.B Mod1-Tab
57Focus next 54Focus next
58.BR window . 55.BR window .
59.TP 56.TP
60.B Mod1-k 57.B Mod1-Shift-Tab
61Focus previous 58Focus previous
62.BR window . 59.BR window .
63.TP 60.TP
61.B Mod1-Return
62Zoom current
63.B window
64to the
65.B master
66column
67.RB ( tiling
68mode only).
69.TP
64.B Mod1-m 70.B Mod1-m
65Maximize current 71Maximize current
66.BR window . 72.BR window .
67.TP 73.TP
68.B Mod1-[0..n]
69View all windows with
70.BR "tag n" .
71.TP
72.B Mod1-space
73Toggle between
74.B tiled
75and
76.B floating
77mode (affects
78.BR "all windows" ).
79.TP
80.B Mod1-Shift-[0..n] 74.B Mod1-Shift-[0..n]
81Apply 75Apply
82.B nth tag 76.B nth tag
83to current 77to current
84.BR window . 78.BR window .
85.TP 79.TP
80.B Mod1-Control-Shift-[0..n]
81Add/remove
82.B nth tag
83to/from current
84.BR window .
85.TP
86.B Mod1-Shift-c 86.B Mod1-Shift-c
87Close focused 87Close focused
88.B window. 88.B window.
89.TP 89.TP
90.B Mod1-Shift-q 90.B Mod1-space
91Quit 91Toggle between
92.B dwm. 92.B tiled
93and
94.B floating
95mode (affects
96.BR "all windows" ).
93.TP 97.TP
94.B Mod1-Shift-Return 98.B Mod1-[0..n]
95Start 99View all windows with
96.BR terminal . 100.BR "tag n" .
97.TP 101.TP
98.B Mod1-Control-[0..n] 102.B Mod1-Control-[0..n]
99Add/remove all windows with 103Add/remove all windows with
100.B tag n 104.B tag n
101to/from the view. 105to/from the view.
102.TP 106.TP
103.B Mod1-Control-Shift-[0..n] 107.B Mod1-Shift-q
104Add/remove 108Quit
105.B nth tag 109.B dwm.
106to/from current
107.BR window .
108.SS Mouse commands 110.SS Mouse commands
109.TP 111.TP
110.B Mod1-Button1 112.B Mod1-Button1
111Move current 113Move current
112.B window 114.B window
113while dragging. 115while dragging
116.RB ( floating
117mode only).
114.TP 118.TP
115.B Mod1-Button2 119.B Mod1-Button2
116Zoom current 120Zoom current
117.B window 121.B window
118to the 122to the
119.B master 123.B master
120column. 124column
125.RB ( tiling
126mode only).
121.TP 127.TP
122.B Mod1-Button3 128.B Mod1-Button3
123Resize current 129Resize current
124.B window 130.B window
125while dragging. 131while dragging
132.RB ( floating
133mode only).
126.SH CUSTOMIZATION 134.SH CUSTOMIZATION
127.B dwm 135.B dwm
128is customized by creating a custom config.h and (re)compiling the source 136is customized by creating a custom config.h and (re)compiling the source
diff --git a/main.c b/main.c
index b348598..d0048be 100644
--- a/main.c
+++ b/main.c
@@ -291,9 +291,8 @@ main(int argc, char *argv[])
291 strcpy(stext, "broken pipe"); 291 strcpy(stext, "broken pipe");
292 drawstatus(); 292 drawstatus();
293 } 293 }
294 if(FD_ISSET(xfd, &rd))
295 procevent();
296 } 294 }
295 procevent();
297 } 296 }
298 cleanup(); 297 cleanup();
299 XCloseDisplay(dpy); 298 XCloseDisplay(dpy);