timplemented Button2 press on tags for toggletag on the focused client - dwm - [fork] customized build of dwm, the dynamic window manager
HTML git clone git://src.adamsgaard.dk/dwm
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 05fbbbd8dc3f990f07fe2055693bef0031fd4623
DIR parent 4c368bcd24172166aab32948fc63feaa6a1bec93
HTML Author: Anselm R. Garbe <arg@10kloc.org>
Date: Thu, 31 Aug 2006 17:49:04 +0200
implemented Button2 press on tags for toggletag on the focused client
Diffstat:
M dwm.1 | 6 ++++++
M event.c | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
---
DIR diff --git a/dwm.1 b/dwm.1
t@@ -47,6 +47,12 @@ 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
DIR diff --git a/event.c b/event.c
t@@ -109,10 +109,17 @@ buttonpress(XEvent *e)
for(a.i = 0; a.i < ntags; a.i++) {
x += textw(tags[a.i]);
if(ev->x < x) {
- if(ev->button == Button1)
+ switch(ev->button) {
+ case Button1:
view(&a);
- else if(ev->button == Button3)
+ break;
+ case Button2:
+ toggletag(&a);
+ break;
+ case Button3:
toggleview(&a);
+ break;
+ }
return;
}
}