about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.118
-rw-r--r--event.c13
2 files changed, 20 insertions, 11 deletions
diff --git a/dwm.1 b/dwm.1
index 2758bbf..31ebad0 100644
--- a/dwm.1
+++ b/dwm.1
@@ -47,16 +47,22 @@ and
 .B floating
 mode.
 .TP
-.B Button2
-click on a tag label adds/removes that
-.B tag
-to/from the focused
-.B window.
-.TP
 .B Button3
 click on a tag label adds/removes all windows with that
 .B tag
 to/from the view.
+.TP
+.B Mod1-Button1
+click on a tag label applies that
+.B tag
+to the focused
+.BR window .
+.TP
+.B Mod1-Button3
+click on a tag label adds/removes that
+.B tag
+to/from the focused
+.BR window .
 .SS Keyboard commands
 .TP
 .B Mod1-Shift-Return
diff --git a/event.c b/event.c
index e97abad..a719bf2 100644
--- a/event.c
+++ b/event.c
@@ -111,13 +111,16 @@ buttonpress(XEvent *e)
 			if(ev->x < x) {
 				switch(ev->button) {
 				case Button1:
-					view(&a);
-					break;
-				case Button2:
-					toggletag(&a);
+					if(ev->state & MODKEY)
+						tag(&a);
+					else
+						view(&a);
 					break;
 				case Button3:
-					toggleview(&a);
+					if(ev->state & MODKEY)
+						toggletag(&a);
+					else
+						toggleview(&a);
 					break;
 				}
 				return;
97d653bd7eab6c620fc53d732ca75f6a880'>^
dc5c070 ^
f17e898 ^
e6cbe9c ^
7ab8c87 ^

4ff8f71 ^

b439892 ^
7ab8c87 ^
7e597ae ^
901b3ed ^
1076f2b

901b3ed ^
0c3544d ^
2b35fae ^

a3e3f0b ^

2b35fae ^
3e06ede ^
6f20315 ^

292ccc4 ^
d4b7a9a ^
7ab8c87 ^
1836b67 ^

7ab8c87 ^
1836b67 ^

7ab8c87 ^
2b35fae ^
72655f0 ^
df74b26 ^


72655f0 ^
df74b26 ^
7ab8c87 ^
72655f0 ^
df74b26 ^
7ab8c87 ^
3af6434 ^
df74b26 ^
a118a57 ^
9fb6502 ^
6499fc4 ^
a118a57 ^
6499fc4 ^
9066ee2 ^
a118a57 ^
9066ee2 ^
bab575c ^
1549faf ^
7ab8c87 ^

1549faf ^
bab575c ^
df74b26 ^
7ab8c87 ^

df74b26 ^
45aea23 ^
7ab8c87 ^
45aea23 ^
df74b26 ^
7ab8c87 ^
1549faf ^
bab575c ^
df74b26 ^
7ab8c87 ^

1549faf ^
bab575c ^
7ab8c87 ^
daae3bb ^
bab575c ^
3e06ede ^
7ab8c87 ^

4bb89e2 ^
df74b26 ^
7ab8c87 ^
2b35fae ^
0c3544d ^
0e5c819 ^
7ab8c87 ^
0e5c819 ^
4bd0d33 ^
a118a57 ^
4bd0d33 ^
0e5c819 ^
7ab8c87 ^
0c3544d ^
7ab8c87 ^
dc5c070 ^
4bb89e2 ^
60b3dce ^
7ab8c87 ^

4bb89e2 ^
7ab8c87 ^
5ef6ef1 ^

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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122