[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Sat, 30 Oct 2010 18:09:39 +0000 (UTC)

changeset: 636:4d577e2bfd04
tag: tip
user: Wolf Tivy <wolf_AT_tivy.com>
date: Sat Oct 30 11:00:34 2010 -0700
files: dwm.suckless.org/patches/combo.md dwm.suckless.org/patches/dwm-5.9-combo.diff
description:
Added combo patch to dwm patches page.


diff -r 317cd6122504 -r 4d577e2bfd04 dwm.suckless.org/patches/combo.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/combo.md Sat Oct 30 11:00:34 2010 -0700
_AT_@ -0,0 +1,24 @@
+# COMBO
+
+## Description
+This patch tweaks the tagging interface so that you can select multiple tags
+for tag or view by pressing all the right keys as a combo. For example to
+view tags 1 and 3, hold MOD and then press and hold 1 and 3 together.
+
+This makes selecting multiple tags very easy and fluid. With this patch,
+tagging goes from being a cool generalization of workspaces to something
+actually usable.
+
+## Applying
+The patch adds two functions that you have to know about: combotag and
+comboview. Replace the tag and view functions with these in TAGKEYS and any
+other places you want. combotag and comboview are totally compatible with tag
+and view so you could replace all usages if you wanted.
+
+## Download
+
+ * [dwm-5.9-combo.diff](dwm-5.9-combo.diff) (2010-10-30)
+
+## Author
+
+ * Wolf Tivy - wolf at tivy dot com.
diff -r 317cd6122504 -r 4d577e2bfd04 dwm.suckless.org/patches/dwm-5.9-combo.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.9-combo.diff Sat Oct 30 11:00:34 2010 -0700
_AT_@ -0,0 +1,64 @@
+diff -r c361034c5a1c dwm.c
+--- a/dwm.c Sat Sep 11 19:00:18 2010 +0000
++++ b/dwm.c Wed Sep 22 17:44:34 2010 -0700
+_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_@ -260,6 +265,7 @@
+ [EnterNotify] = enternotify,
+ [Expose] = expose,
+ [FocusIn] = focusin,
++ [KeyRelease] = keyrelease,
+ [KeyPress] = keypress,
+ [MappingNotify] = mappingnotify,
+ [MapRequest] = maprequest,
+_AT_@ -282,6 +288,40 @@
+ 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;
++ }
++ 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;
++ }
++ arrange(selmon);
++}
++
+ void
+ applyrules(Client *c) {
+ const char *class, *instance;
Received on Sat Oct 30 2010 - 20:09:39 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:30 CEST