[wiki] [sites] updated combo for dwm-6.0 || Dan McNair
changeset: 983:0df635e5e127
tag: tip
user: Dan McNair <cosfx_AT_h0v3.net>
date: Tue Oct 09 21:58:05 2012 -0500
files: dwm.suckless.org/patches/combo.md dwm.suckless.org/patches/dwm-6.0-combo.diff
description:
updated combo for dwm-6.0
diff -r 212a6d467e7a -r 0df635e5e127 dwm.suckless.org/patches/combo.md
--- a/dwm.suckless.org/patches/combo.md Sun Sep 30 17:12:04 2012 -0400
+++ b/dwm.suckless.org/patches/combo.md Tue Oct 09 21:58:05 2012 -0500
_AT_@ -19,8 +19,10 @@
--------
* [dwm-5.9-combo.diff](dwm-5.9-combo.diff) (2010-10-30)
+ * [dwm-6.0-combo.diff](dwm-6.0-combo.diff) (2012-10-09)
Author
------
* Wolf Tivy - wolf at tivy dot com.
+ * Dan McNair - cosfx at h0v3 dot net (mechanical update to 6.0)
diff -r 212a6d467e7a -r 0df635e5e127 dwm.suckless.org/patches/dwm-6.0-combo.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-6.0-combo.diff Tue Oct 09 21:58:05 2012 -0500
_AT_@ -0,0 +1,74 @@
+diff -r c361034c5a1c dwm.c
+--- a/dwm.c Sat Sep 11 19:00:18 2010 +0000
++++ b/dwm.c Thu Nov 25 22:54:04 2010 -0800
+_AT_@ -243,6 +243,11 @@
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
+
++static void keyrelease(XEvent *e);
++static void combotag(const Arg *arg);
++static void comboview(const Arg *arg);
++
++
+ /* variables */
+ static const char broken[] = "broken";
+ static char stext[256];
+_AT_@ -253,6 +258,7 @@
+ static unsigned int numlockmask = 0;
+ static void (*handler[LASTEvent]) (XEvent *) = {
+ [ButtonPress] = buttonpress,
++ [ButtonRelease] = keyrelease,
+ [ClientMessage] = clientmessage,
+ [ConfigureRequest] = configurerequest,
+ [ConfigureNotify] = configurenotify,
+_AT_@ -260,6 +266,7 @@
+ [EnterNotify] = enternotify,
+ [Expose] = expose,
+ [FocusIn] = focusin,
++ [KeyRelease] = keyrelease,
+ [KeyPress] = keypress,
+ [MappingNotify] = mappingnotify,
+ [MapRequest] = maprequest,
+_AT_@ -282,6 +289,42 @@
+ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
+
+ /* function implementations */
++static int combo = 0;
++
++void
++keyrelease(XEvent *e) {
++ combo = 0;
++}
++
++void
++combotag(const Arg *arg) {
++ if(selmon->sel && arg->ui & TAGMASK) {
++ if (combo) {
++ selmon->sel->tags |= arg->ui & TAGMASK;
++ } else {
++ combo = 1;
++ selmon->sel->tags = arg->ui & TAGMASK;
++ }
++ focus(NULL);
++ arrange(selmon);
++ }
++}
++
++void
++comboview(const Arg *arg) {
++ unsigned newtags = arg->ui & TAGMASK;
++ if (combo) {
++ selmon->tagset[selmon->seltags] |= newtags;
++ } else {
++ selmon->seltags ^= 1; /*toggle tagset*/
++ combo = 1;
++ if (newtags)
++ selmon->tagset[selmon->seltags] = newtags;
++ }
++ focus(NULL);
++ arrange(selmon);
++}
++
+ void
+ applyrules(Client *c) {
+ const char *class, *instance;
Received on Wed Oct 10 2012 - 04:56:21 CEST
This archive was generated by hypermail 2.3.0
: Wed Oct 10 2012 - 05:00:08 CEST