[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Mon, 7 Sep 2009 19:30:31 +0000 (UTC)

changeset: 220:e7ab38fe25bb
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Mon Sep 07 20:30:51 2009 +0100
files: dwm.suckless.org/old_patches/altmovefocus.md dwm.suckless.org/old_patches/boldfont.md dwm.suckless.org/old_patches/clientspertag.md dwm.suckless.org/old_patches/color_status_bar.md dwm.suckless.org/old_patches/colored_status_text.md dwm.suckless.org/old_patches/dwm-5.2-colorstatus.diff dwm.suckless.org/old_patches/dwm-5.2-colorstatus.xinitrc dwm.suckless.org/old_patches/dwm-5.2-pertag.diff dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.diff dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.png dwm.suckless.org/old_patches/dwm-5.4-pertag.diff dwm.suckless.org/old_patches/fibonacci.md dwm.suckless.org/old_patches/float_border_color.md dwm.suckless.org/old_patches/gridmode.md dwm.suckless.org/old_patches/index.md dwm.suckless.org/old_patches/mouseontitle.md dwm.suckless.org/old_patches/moveresize.md dwm.suckless.org/old_patches/movestack.md dwm.suckless.org/old_patches/pertag.md dwm.suckless.org/old_patches/raiselower.md dwm.suckless.org/old_patches/save_floats.md dwm.suckless.org/old_patche
s/tagall.md dwm.suckless.org/old_patches/taglayouts.md dwm.suckless.org/old_patches/tilemovemouse.md dwm.suckless.org/old_patches/workspaces.md dwm.suckless.org/patches/altmovefocus.md dwm.suckless.org/patches/boldfont.md dwm.suckless.org/patches/clientspertag.md dwm.suckless.org/patches/color_status_bar.md dwm.suckless.org/patches/colored_status_text.md dwm.suckless.org/patches/dwm-5.2-colorstatus.diff dwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc dwm.suckless.org/patches/dwm-5.2-monocle_count.diff dwm.suckless.org/patches/dwm-5.2-pertag.diff dwm.suckless.org/patches/dwm-5.3.1-statuscolors.diff dwm.suckless.org/patches/dwm-5.3.1-statuscolors.png dwm.suckless.org/patches/dwm-5.4-pertag.diff dwm.suckless.org/patches/email_notifier_script.md dwm.suckless.org/patches/fibonacci.md dwm.suckless.org/patches/float_border_color.md dwm.suckless.org/patches/gridmode.md dwm.suckless.org/patches/monocle_count.md dwm.suckless.org/patches/mouseontitle.md dwm.suckless.org/patches/moveresize.md dwm.suckless.org/patch
es/movestack.md dwm.suckless.org/patches/pertag.md dwm.suckless.org/patches/raiselower.md dwm.suckless.org/patches/save_floats.md dwm.suckless.org/patches/tagall.md dwm.suckless.org/patches/taglayouts.md dwm.suckless.org/patches/tilemovemouse.md dwm.suckless.org/patches/workspaces.md dwm.suckless.org/scripts/email_notifier_script.md
description:
reorganised dwm patches


diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/altmovefocus.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/altmovefocus.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,10 @@
+ANOTHER FOCUS MOVING MODEL
+==========================
+
+Description
+-----------
+When a single tag is displayed, calling view() or tag() with it as an argument is useless. This patch enables moving focus forward with view() calls and backward with tag() instead of doing nothing. Of course, those who toggle several tags at time or just have more than 3-4 tags won't benefit much from such behaviour.
+
+Download
+--------
+* [dwm-5.2-altmovefocus.diff](http://mkmks.org/files/patches/dwm-5.2-altmovefocus.diff)
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/boldfont.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/boldfont.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,27 @@
+BOLDFONT
+========
+
+Description
+-----------
+
+This patch makes dwm use a different font (specified as `boldfont` in
+`config.h`) for occupied tags, and titles of floating windows.
+
+It also removes the squares that now mark occupied tags and floating windows.
+
+Configuration
+-------------
+
+ static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
+ static const char boldfont[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*";
+
+Download
+--------
+
+- [dwm-5.2-boldfont.diff](http://novsak.name/files/dwm/dwm-5.2-boldfont.diff)
+- [dwm-5.1-boldfont.diff](http://novsak.name/files/dwm/dwm-5.1-boldfont.diff)
+
+Author
+------
+
+- Luka Novsak <[lukanovsak_AT_gmail.com](mailto:lukanovsak_AT_gmail.com)>
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/clientspertag.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/clientspertag.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,54 @@
+LIMIT CLIENTS PER TAG PATCH
+===========================
+
+Last update: 2007-10-25
+
+See [nmaster][2] for cpt on dwm-4.6.
+
+This patch allows you to limit the number of clients to be shown.
+This restriction only affects non-floating windows.
+
+This patch can be used as a 'set' or 'toggle' mode.
+
+Tips
+----
+
+* To show all windows put "-1" as argument value.
+* To only display floating windows put "0" as argument.
+* For a toggling pair put "^2".
+
+Configuration
+-------------
+
+The MODKEY+w toggles between two visible tiled windows and MODKEY+SHIFT+w hides all tiled windows.
+
+ { MODKEY|ShiftMask, XK_q, clientspertag, "0" }, \
+ { MODKEY, XK_q, clientspertag, "^1" }, \
+ { MODKEY, XK_w, clientspertag, "^2" }, \
+ { MODKEY, XK_e, clientspertag, "^3" }, \
+
+Download
+--------
+
+You can download this patch [dwm-4.4-cpt.patch](http://news.nopcode.org/dwm-4.4-cpt.patch) (3K)
+
+See [nmaster][1] for dwm-4.6.
+
+Here's a [patch][2] from <i>Ritesh Kumar</i> that modifies dwm.c to show cpt and total number of clients in the statusbar.
+
+TODO
+----
+
+* Maybe it should be renamed to "tiledlimit" or "clientslimit".
+* Think about a way to make the focused client always visible (enhanced monocle patch?)
+
+Feedback is welcome :)
+
+AUTHOR
+------
+
+* pancake -- pancake /at/ youterm /dot/ com
+
+[1]: /dwm/patches/nmaster.html
+[2]: http://news.nopcode.org/cptdwm-4.6.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/color_status_bar.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/color_status_bar.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,35 @@
+# COLOR STATUS BAR #
+
+## Description ##
+
+This patch adds some color to the status bar. It allows you to change the colorset of text portions from "norm" to "sel" (and back) and to invert the colorset (the foreground becomes the background color and vice versa).
+
+
+## Usage ##
+
+Download the patch and apply it according to the [general instructions](.). The patch will make the following changes:
+
+ * colorstatus.c: adding the file
+ * dwm.c: adding the include-line for 'colorstatus.c'
+ * dwm.c ('drawbar' function): adding the int-variable 'stextw'
+ * dwm.c ('drawbar' function): changing the 'drawtext' section for stext
+
+
+## Configuration ##
+
+The configuration is done in the file '.xinitrc', where you define the status bar text. You can add the following tags:
+
+ * '[c]' (without quotes): toggles the colorset (norm -> sel or sel -> norm depending on the currently selected colorset)
+ * '[i]' (without quotes): inverts the current colorset (fgcolor -> bgcolor and bgcolor -> fgcolor)
+
+The change is applied from the position of the tag onwards. To revert the change you have to set the same tag again.
+
+### Example ###
+echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr
+
+
+## Download ##
+
+ * [dwm-5.2-colorstatus.diff](dwm-5.2-colorstatus.diff) (4.1k, 131 additional lines) (20081117)
+ * [.xinitrc example](dwm-5.2-colorstatus.xinitrc) (0.8k) (20081117)
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/colored_status_text.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/colored_status_text.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,60 @@
+# COLORED STATUS TEXT #
+
+## Description ##
+
+This patch enables colored text in the status bar. It changes the way colors are defined in config.h, allowing the user to define multiple color combinations for use in their status script.
+
+## Configuration ##
+
+Download the patch and apply it according to the [general instructions](.).
+
+Modify the colors definition in 'config.h' to suit your needs. Make sure to define at least 3 colors as they will be used for 'normal', 'selected', and 'urgent' windows, respectively.
+
+## Usage ##
+
+Add code to your status script to output the raw characters '\x03' to switch to the 'urgent' color, or '\x04' to switch to the 4th defined color, etc. Note that the color indices in the status text are +1 from the definition in 'config.h' (because '\0' is the string terminator). To switch back to the normal text color use '\x01'.
+
+### Example ###
+
+The following definition in 'config.h':
+
+ #define NUMCOLORS 4
+ static const char colors[NUMCOLORS][ColLast][8] = {
+ // border foreground background
+ { "#000033", "#dddddd", "#000033" }, // normal
+ { "#000088", "#ffffff", "#000088" }, // selected
+ { "#ff0000", "#000000", "#ffff00" }, // urgent/warning (black on yellow)
+ { "#ff0000", "#ffffff", "#ff0000" }, // error (white on red)
+ // add more here
+ };
+
+Coupled with a matching status script produces the following:
+ ![Example Colored Status Text](dwm-5.3.1-statuscolors.png)
+
+A really silly example:
+
+ echo -e "normal \x01 selected \x03 warning/urgent \x04 error \x01 back to normal text" | dwm
+
+An example status script snippet to take advantage of the colors:
+
+ status=""
+ if [$batperc -le 10]; then
+ # use "warning" color
+ status+="\x03 BAT: $batperc"
+ elif [$batperc -le 5]; then
+ # use "error" color
+ status+="\x04 BAT: $batperc"
+ else
+ # default is normal color
+ status+="BAT: $batperc"
+ fi
+
+ # switch back to normal color for date
+ status+="\x01| "+$(date)
+
+ echo -e $status
+
+## Download ##
+
+ * [dwm-5.3.1-statuscolors.diff](dwm-5.3.1-statuscolors.diff)
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.2-colorstatus.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/dwm-5.2-colorstatus.diff Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,183 @@
+diff -up dwm-5.2-original/colorstatus.c dwm-5.2-modified/colorstatus.c
+--- /dev/null 2008-11-17 18:12:14.000000000 +0100
++++ dwm-5.2-modified/colorstatus.c 2008-11-17 18:09:29.000000000 +0100
+_AT_@ -0,0 +1,144 @@
++int
++drawstatustext(int x) {
++ char cd[] = "[c]", id[] = "[i]";
++ char buf1[256] = {0};
++ Bool parse = True;
++ Bool cs = False, is = False;
++ int stextw = 0;
++
++ strcpy(buf1, stext);
++ while(parse) {
++ char *cp = 0, *ip = 0;
++
++ cp = strstr(buf1, cd);
++ ip = strstr(buf1, id);
++ if(cp != NULL || ip != NULL) {
++ char buf2[256] = {0}, buf3[256] = {0};
++ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0;
++
++ if(cp != NULL)
++ clen2 = cp - buf1;
++ if(ip != NULL)
++ ilen2 = ip - buf1;
++ if(clen2 < 0) {
++ len2 = ilen2;
++ dlen = strlen(id);
++ }
++ else if(ilen2 < 0) {
++ len2 = clen2;
++ dlen = strlen(cd);
++ }
++ else if(clen2 < ilen2) {
++ len2 = clen2;
++ dlen = strlen(cd);
++ }
++ else {
++ len2 = ilen2;
++ dlen = strlen(id);
++ }
++ strncpy(buf2, buf1, len2);
++ offset3 = len2 + dlen;
++ len3 = strlen(buf1) - offset3;
++ strncpy(buf3, buf1 + offset3, len3);
++ if(buf2 != NULL && strlen(buf2) > 0)
++ stextw = stextw + TEXTW(buf2);
++
++ memset(buf1, '\0', sizeof(buf1));
++ strcpy(buf1, buf3);
++ }
++ else {
++ stextw = stextw + TEXTW(buf1);
++ parse = False;
++ }
++ }
++ dc.x = ww - stextw;
++
++ memset(buf1, '\0', sizeof(buf1));
++ strcpy(buf1, stext);
++ parse = True;
++ while(parse) {
++ char *cp = 0, *ip = 0;
++
++ cp = strstr(buf1, cd);
++ ip = strstr(buf1, id);
++ if(cp != NULL || ip != NULL) {
++ char buf2[256] = {0}, buf3[256] = {0};
++ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0;
++ Bool cs3 = cs, is3 = is;
++
++ if(cp != NULL)
++ clen2 = cp - buf1;
++ if(ip != NULL)
++ ilen2 = ip - buf1;
++ if(clen2 < 0) {
++ len2 = ilen2;
++ dlen = strlen(id);
++ is3 = !is;
++ }
++ else if(ilen2 < 0) {
++ len2 = clen2;
++ dlen = strlen(cd);
++ cs3 = !cs;
++ }
++ else if(clen2 < ilen2) {
++ len2 = clen2;
++ dlen = strlen(cd);
++ cs3 = !cs;
++ }
++ else {
++ len2 = ilen2;
++ dlen = strlen(id);
++ is3 = !is;
++ }
++
++ strncpy(buf2, buf1, len2);
++ offset3 = len2 + dlen;
++ len3 = strlen(buf1) - offset3;
++ strncpy(buf3, buf1 + offset3, len3);
++ if(buf2 != NULL && strlen(buf2) > 0) {
++ dc.w = TEXTW(buf2);
++ if(cs) {
++ if(is)
++ drawtext(buf2, dc.sel, True);
++ else
++ drawtext(buf2, dc.sel, False);
++ }
++ else {
++ if(is)
++ drawtext(buf2, dc.norm, True);
++ else
++ drawtext(buf2, dc.norm, False);
++ }
++ dc.x = dc.x + dc.w;
++ }
++
++ cs = cs3;
++ is = is3;
++ memset(buf1, '\0', sizeof(buf1));
++ strcpy(buf1, buf3);
++ }
++ else {
++ dc.w = TEXTW(buf1);
++ dc.x = ww - dc.w;
++ if(dc.x < x) {
++ dc.x = x;
++ dc.w = ww - x;
++ }
++ if(cs) {
++ if(is)
++ drawtext(buf1, dc.sel, True);
++ else
++ drawtext(buf1, dc.sel, False);
++ }
++ else {
++ if(is)
++ drawtext(buf1, dc.norm, True);
++ else
++ drawtext(buf1, dc.norm, False);
++ }
++ parse = False;
++ }
++ }
++
++ return(stextw);
++}
+diff -up dwm-5.2-original/dwm.c dwm-5.2-modified/dwm.c
+--- dwm-5.2-original/dwm.c 2008-09-09 21:46:17.000000000 +0200
++++ dwm-5.2-modified/dwm.c 2008-11-17 18:09:29.000000000 +0100
+_AT_@ -239,6 +239,7 @@ static Layout *lt[] = { NULL, NULL };
+ static Window root, barwin;
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
++#include "colorstatus.c"
+
+ /* compile-time check if all tags fit into an unsigned int bit array. */
+ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
+_AT_@ -495,6 +496,7 @@ drawbar(void) {
+ unsigned int i, occ = 0, urg = 0;
+ unsigned long *col;
+ Client *c;
++ int stextw = 0;
+
+ for(c = clients; c; c = c->next) {
+ occ |= c->tags;
+_AT_@ -517,13 +519,8 @@ drawbar(void) {
+ }
+ else
+ x = dc.x;
+- dc.w = TEXTW(stext);
+- dc.x = ww - dc.w;
+- if(dc.x < x) {
+- dc.x = x;
+- dc.w = ww - x;
+- }
+- drawtext(stext, dc.norm, False);
++ stextw = drawstatustext(x);
++ dc.x = ww - stextw;
+ if((dc.w = dc.x - x) > bh) {
+ dc.x = x;
+ if(sel) {
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.2-colorstatus.xinitrc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/dwm-5.2-colorstatus.xinitrc Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,24 @@
+while true
+do
+ datestr=`date '+%a, %x'`
+ timestr=`date '+%H:%M'`
+
+ cpuavgload=`uptime | sed -n 's/.*: //; s/, .*// p'`
+
+ batcurrent=`sed -n 's/ mAh//; s/remaining[ a-z:]*// p' /proc/acpi/battery/BAT1/state`
+ batfull=`sed -n 's/ mAh//; s/last full[ a-z:]*// p' /proc/acpi/battery/BAT1/info`
+ batpercent=`echo "($batcurrent*100)/$batfull" | bc`
+ if [ $batpercent -lt 10 ]
+ then batpercent=`echo [c]$batpercent%[c]`
+ else batpercent=`echo $batpercent%`
+ fi
+
+ audiofront=`amixer sget Front | sed -n 's/\] \[[^%]*\]//; s/[ ]*Front Left: Playback [0-9]* \[// p'`
+
+ mailnew=`claws-mail --status inbox | sed -n 's/ [ 0-9ClawsMinotrug\.]*// p'`
+
+ echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr
+
+ sleep 2
+done | dwm
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.2-pertag.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/dwm-5.2-pertag.diff Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,123 @@
+--- dwm-5.2/dwm.c 2008-09-09 21:46:17.000000000 +0200
++++ dwm-5.2-pertag/dwm.c 2008-10-12 23:53:30.000000000 +0200
+_AT_@ -240,6 +240,11 @@
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
+
++static int curtag = 1, prevtag = 1;
++static Layout *lts[LENGTH(tags) + 1];
++static double mfacts[LENGTH(tags) + 1];
++static Bool showbars[LENGTH(tags) + 1];
++
+ /* compile-time check if all tags fit into an unsigned int bit array. */
+ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
+
+_AT_@ -1272,7 +1277,7 @@
+ if(!arg || !arg->v || arg->v != lt[sellt])
+ sellt ^= 1;
+ if(arg && arg->v)
+- lt[sellt] = (Layout *)arg->v;
++ lt[sellt] = lts[curtag] = (Layout *)arg->v;
+ if(sel)
+ arrange();
+ else
+_AT_@ -1289,7 +1294,7 @@
+ f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0;
+ if(f < 0.1 || f > 0.9)
+ return;
+- mfact = f;
++ mfact = mfacts[curtag] = f;
+ arrange();
+ }
+
+_AT_@ -1337,12 +1342,27 @@
+ if(!dc.font.set)
+ XSetFont(dpy, dc.gc, dc.font.xfont->fid);
+
++ /* init mfacts */
++ for(i=0; i < LENGTH(tags) + 1 ; i++) {
++ mfacts[i] = mfact;
++ }
++
++ /* init layouts */
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ lts[i] = &layouts[0];
++ }
++
++
+ /* init bar */
+ for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
+ w = TEXTW(layouts[i].symbol);
+ blw = MAX(blw, w);
+ }
+
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ showbars[i] = showbar;
++ }
++
+ wa.override_redirect = 1;
+ wa.background_pixmap = ParentRelative;
+ wa.event_mask = ButtonPressMask|ExposureMask;
+_AT_@ -1457,7 +1477,7 @@
+
+ void
+ togglebar(const Arg *arg) {
+- showbar = !showbar;
++ showbar = showbars[curtag] = !showbar;
+ updategeom();
+ updatebar();
+ arrange();
+_AT_@ -1490,9 +1510,23 @@
+ void
+ toggleview(const Arg *arg) {
+ unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK);
++ unsigned int i;
+
+ if(mask) {
++ if(mask == ~0) {
++ prevtag = curtag;
++ curtag = 0;
++ }
++ if(!(mask & 1 << (curtag - 1))) {
++ prevtag = curtag;
++ for (i=0; !(mask & 1 << i); i++);
++ curtag = i + 1;
++ }
+ tagset[seltags] = mask;
++ lt[sellt] = lts[curtag];
++ mfact = mfacts[curtag];
++ if (showbar != showbars[curtag])
++ togglebar(NULL);
+ clearurgent();
+ arrange();
+ }
+_AT_@ -1661,11 +1695,28 @@
+
+ void
+ view(const Arg *arg) {
++ unsigned int i;
+ if((arg->ui & TAGMASK) == tagset[seltags])
+ return;
+ seltags ^= 1; /* toggle sel tagset */
+- if(arg->ui & TAGMASK)
++ if(arg->ui & TAGMASK) {
+ tagset[seltags] = arg->ui & TAGMASK;
++ prevtag = curtag;
++ if(arg->ui == ~0)
++ curtag = 0;
++ else {
++ for (i=0; !(arg->ui & 1 << i); i++);
++ curtag = i + 1;
++ }
++ } else {
++ prevtag= curtag ^ prevtag;
++ curtag^= prevtag;
++ prevtag= curtag ^ prevtag;
++ }
++ lt[sellt]= lts[curtag];
++ mfact = mfacts[curtag];
++ if(showbar != showbars[curtag])
++ togglebar(NULL);
+ clearurgent();
+ arrange();
+ }
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.diff Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,228 @@
+diff -r 94032e7d3943 config.def.h
+--- a/config.def.h Sat Dec 06 11:22:30 2008 +0000
++++ b/config.def.h Sat Dec 06 11:24:26 2008 -0500
+_AT_@ -1,13 +1,16 @@
+ /* See LICENSE file for copyright and license details. */
+
+ /* appearance */
++#define NUMCOLORS 4 // need at least 3
++static const char colors[NUMCOLORS][ColLast][8] = {
++ // border foreground background
++ { "#cccccc", "#000000", "#cccccc" }, // 0 = normal
++ { "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected
++ { "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning
++ { "#ff0000", "#ffffff", "#ff0000" }, // 3 = error
++ // add more here
++};
+ static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
+-static const char normbordercolor[] = "#cccccc";
+-static const char normbgcolor[] = "#cccccc";
+-static const char normfgcolor[] = "#000000";
+-static const char selbordercolor[] = "#0066ff";
+-static const char selbgcolor[] = "#0066ff";
+-static const char selfgcolor[] = "#ffffff";
+ static unsigned int borderpx = 1; /* border pixel of windows */
+ static unsigned int snap = 32; /* snap pixel */
+ static Bool showbar = True; /* False means no bar */
+_AT_@ -49,7 +52,7 @@
+ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
+
+ /* commands */
+-static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
++static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
+ static const char *termcmd[] = { "uxterm", NULL };
+
+ static Key keys[] = {
+diff -r 94032e7d3943 dwm.c
+--- a/dwm.c Sat Dec 06 11:22:30 2008 +0000
++++ b/dwm.c Sat Dec 06 11:24:26 2008 -0500
+_AT_@ -52,6 +52,7 @@
+ #define MAX(a, b) ((a) > (b) ? (a) : (b))
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+ #define MAXTAGLEN 16
++#define MAXCOLORS 8
+ #define MOUSEMASK (BUTTONMASK|PointerMotionMask)
+ #define WIDTH(x) ((x)->w + 2 * (x)->bw)
+ #define HEIGHT(x) ((x)->h + 2 * (x)->bw)
+_AT_@ -97,8 +98,7 @@
+
+ typedef struct {
+ int x, y, w, h;
+- unsigned long norm[ColLast];
+- unsigned long sel[ColLast];
++ unsigned long colors[MAXCOLORS][ColLast];
+ Drawable drawable;
+ GC gc;
+ struct {
+_AT_@ -147,8 +147,9 @@
+ static void detachstack(Client *c);
+ static void die(const char *errstr, ...);
+ static void drawbar(void);
+-static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
+-static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
++static void drawcoloredtext(char *text);
++static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
++static void drawtext(const char *text, unsigned long col[ColLast], Bool pad);
+ static void enternotify(XEvent *e);
+ static void expose(XEvent *e);
+ static void focus(Client *c);
+_AT_@ -501,14 +502,14 @@
+ dc.x = 0;
+ for(i = 0; i < LENGTH(tags); i++) {
+ dc.w = TEXTW(tags[i]);
+- col = tagset[seltags] & 1 << i ? dc.sel : dc.norm;
+- drawtext(tags[i], col, urg & 1 << i);
+- drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, urg & 1 << i, col);
++ col = dc.colors[ (tagset[seltags] & 1 << i ? 1 : (urg & 1 << i ? 2:0)) ];
++ drawtext(tags[i], col, True);
++ drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, col);
+ dc.x += dc.w;
+ }
+ if(blw > 0) {
+ dc.w = blw;
+- drawtext(lt[sellt]->symbol, dc.norm, False);
++ drawtext(lt[sellt]->symbol, dc.colors[0], True);
+ x = dc.x + dc.w;
+ }
+ else
+_AT_@ -519,27 +520,57 @@
+ dc.x = x;
+ dc.w = ww - x;
+ }
+- drawtext(stext, dc.norm, False);
++ drawcoloredtext(stext);
+ if((dc.w = dc.x - x) > bh) {
+ dc.x = x;
+ if(sel) {
+- drawtext(sel->name, dc.sel, False);
+- drawsquare(sel->isfixed, sel->isfloating, False, dc.sel);
++ drawtext(sel->name, dc.colors[1], True);
++ drawsquare(sel->isfixed, sel->isfloating, dc.colors[1]);
+ }
+ else
+- drawtext(NULL, dc.norm, False);
++ drawtext(NULL, dc.colors[0], True);
+ }
+ XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, ww, bh, 0, 0);
+ XSync(dpy, False);
+ }
+
+ void
+-drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) {
++drawcoloredtext(char *text) {
++ Bool first=True;
++ char *buf = text, *ptr = buf, c = 1;
++ unsigned long *col = dc.colors[0];
++ int i, ox = dc.x;
++
++ while( *ptr ) {
++ for( i = 0; *ptr < 0 || *ptr > NUMCOLORS; i++, ptr++);
++ if( !*ptr ) break;
++ c=*ptr;
++ *ptr=0;
++ if( i ) {
++ dc.w = ww - dc.x;
++ drawtext(buf, col, first);
++ dc.x += textnw(buf, i) + textnw(&c,1);
++ if( first ) dc.x += ( dc.font.ascent + dc.font.descent ) / 2;
++ first = False;
++ } else if( first ) {
++ ox = dc.x += textnw(&c,1);
++ }
++ *ptr = c;
++ col = dc.colors[ c-1 ];
++ buf = ++ptr;
++ }
++ if( !first ) dc.x-=(dc.font.ascent+dc.font.descent)/2;
++ drawtext(buf, col, True);
++ dc.x = ox;
++}
++
++void
++drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) {
+ int x;
+ XGCValues gcv;
+ XRectangle r = { dc.x, dc.y, dc.w, dc.h };
+
+- gcv.foreground = col[invert ? ColBG : ColFG];
++ gcv.foreground = col[ ColFG ];
+ XChangeGC(dpy, dc.gc, GCForeground, &gcv);
+ x = (dc.font.ascent + dc.font.descent + 2) / 4;
+ r.x = dc.x + 1;
+_AT_@ -555,18 +586,18 @@
+ }
+
+ void
+-drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
++drawtext(const char *text, unsigned long col[ColLast], Bool pad) {
+ char buf[256];
+ int i, x, y, h, len, olen;
+ XRectangle r = { dc.x, dc.y, dc.w, dc.h };
+
+- XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]);
++ XSetForeground(dpy, dc.gc, col[ ColBG ]);
+ XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
+ if(!text)
+ return;
+ olen = strlen(text);
+- h = dc.font.ascent + dc.font.descent;
+- y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
++ h = pad ? (dc.font.ascent + dc.font.descent) : 0;
++ y = dc.y + ((dc.h + dc.font.ascent - dc.font.descent) / 2);
+ x = dc.x + (h / 2);
+ /* shorten text if necessary */
+ for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--);
+_AT_@ -575,7 +606,7 @@
+ memcpy(buf, text, len);
+ if(len < olen)
+ for(i = len; i && i > len - 3; buf[--i] = '.');
+- XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
++ XSetForeground(dpy, dc.gc, col[ ColFG ]);
+ if(dc.font.set)
+ XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
+ else
+_AT_@ -609,7 +640,7 @@
+ for(c = stack; c && !ISVISIBLE(c); c = c->snext);
+ if(sel && sel != c) {
+ grabbuttons(sel, False);
+- XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
++ XSetWindowBorder(dpy, sel->win, dc.colors[0][ColBorder]);
+ }
+ if(c) {
+ if(c->isurgent)
+_AT_@ -617,7 +648,7 @@
+ detachstack(c);
+ attachstack(c);
+ grabbuttons(c, True);
+- XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
++ XSetWindowBorder(dpy, c->win, dc.colors[1][ColBorder]);
+ XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
+ }
+ else
+_AT_@ -878,7 +909,7 @@
+
+ wc.border_width = c->bw;
+ XConfigureWindow(dpy, w, CWBorderWidth, &wc);
+- XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
++ XSetWindowBorder(dpy, w, dc.colors[0][ColBorder]);
+ configure(c); /* propagates border_width, if size doesn't change */
+ updatesizehints(c);
+ XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
+_AT_@ -1329,12 +1360,11 @@
+ cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
+
+ /* init appearance */
+- dc.norm[ColBorder] = getcolor(normbordercolor);
+- dc.norm[ColBG] = getcolor(normbgcolor);
+- dc.norm[ColFG] = getcolor(normfgcolor);
+- dc.sel[ColBorder] = getcolor(selbordercolor);
+- dc.sel[ColBG] = getcolor(selbgcolor);
+- dc.sel[ColFG] = getcolor(selfgcolor);
++ for(i=0; i<NUMCOLORS; i++) {
++ dc.colors[i][ColBorder] = getcolor( colors[i][ColBorder] );
++ dc.colors[i][ColFG] = getcolor( colors[i][ColFG] );
++ dc.colors[i][ColBG] = getcolor( colors[i][ColBG] );
++ }
+ dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen));
+ dc.gc = XCreateGC(dpy, root, 0, 0);
+ XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.png
Binary file dwm.suckless.org/old_patches/dwm-5.3.1-statuscolors.png has changed
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/dwm-5.4-pertag.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/dwm-5.4-pertag.diff Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,123 @@
+diff -r add6eb26ebaa dwm.c
+--- a/dwm.c Sat Dec 20 12:02:14 2008 +0000
++++ b/dwm.c Sun Dec 21 18:39:14 2008 +0100
+_AT_@ -240,6 +240,11 @@ static Window root, barwin;
+ static Window root, barwin;
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
++
++static int curtag = 1, prevtag = 1;
++static Layout *lts[LENGTH(tags) + 1];
++static double mfacts[LENGTH(tags) + 1];
++static Bool showbars[LENGTH(tags) + 1];
+
+ /* compile-time check if all tags fit into an unsigned int bit array. */
+ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
+_AT_@ -1244,7 +1249,7 @@ setlayout(const Arg *arg) {
+ if(!arg || !arg->v || arg->v != lt[sellt])
+ sellt ^= 1;
+ if(arg && arg->v)
+- lt[sellt] = (Layout *)arg->v;
++ lt[sellt] = lts[curtag] = (Layout *)arg->v;
+ if(sel)
+ arrange();
+ else
+_AT_@ -1261,7 +1266,7 @@ setmfact(const Arg *arg) {
+ f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0;
+ if(f < 0.1 || f > 0.9)
+ return;
+- mfact = f;
++ mfact = mfacts[curtag] = f;
+ arrange();
+ }
+
+_AT_@ -1309,11 +1314,26 @@ setup(void) {
+ if(!dc.font.set)
+ XSetFont(dpy, dc.gc, dc.font.xfont->fid);
+
++ /* init mfacts */
++ for(i=0; i < LENGTH(tags) + 1 ; i++) {
++ mfacts[i] = mfact;
++ }
++
++ /* init layouts */
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ lts[i] = &layouts[0];
++ }
++
++
+ /* init bar */
+ for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
+ w = TEXTW(layouts[i].symbol);
+ blw = MAX(blw, w);
+ }
++
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ showbars[i] = showbar;
++ }
+
+ wa.override_redirect = 1;
+ wa.background_pixmap = ParentRelative;
+_AT_@ -1434,7 +1454,7 @@ tile(void) {
+
+ void
+ togglebar(const Arg *arg) {
+- showbar = !showbar;
++ showbar = showbars[curtag] = !showbar;
+ updategeom();
+ updatebar();
+ arrange();
+_AT_@ -1467,9 +1487,23 @@ void
+ void
+ toggleview(const Arg *arg) {
+ unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK);
++ unsigned int i;
+
+ if(mask) {
++ if(mask == ~0) {
++ prevtag = curtag;
++ curtag = 0;
++ }
++ if(!(mask & 1 << (curtag - 1))) {
++ prevtag = curtag;
++ for (i=0; !(mask & 1 << i); i++);
++ curtag = i + 1;
++ }
+ tagset[seltags] = mask;
++ lt[sellt] = lts[curtag];
++ mfact = mfacts[curtag];
++ if (showbar != showbars[curtag])
++ togglebar(NULL);
+ arrange();
+ }
+ }
+_AT_@ -1644,11 +1678,28 @@ updatewmhints(Client *c) {
+
+ void
+ view(const Arg *arg) {
++ unsigned int i;
+ if((arg->ui & TAGMASK) == tagset[seltags])
+ return;
+ seltags ^= 1; /* toggle sel tagset */
+- if(arg->ui & TAGMASK)
++ if(arg->ui & TAGMASK) {
+ tagset[seltags] = arg->ui & TAGMASK;
++ prevtag = curtag;
++ if(arg->ui == ~0)
++ curtag = 0;
++ else {
++ for (i=0; !(arg->ui & 1 << i); i++);
++ curtag = i + 1;
++ }
++ } else {
++ prevtag= curtag ^ prevtag;
++ curtag^= prevtag;
++ prevtag= curtag ^ prevtag;
++ }
++ lt[sellt]= lts[curtag];
++ mfact = mfacts[curtag];
++ if(showbar != showbars[curtag])
++ togglebar(NULL);
+ arrange();
+ }
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/fibonacci.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/fibonacci.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,58 @@
+# FIBONACCI LAYOUTS
+
+## Description
+
+This patch adds two new layouts (`spiral` and `dwindle`) that arranges all
+windows in Fibonacci tiles: The first window uses half the screen, the second
+the half of the remainder, etc. ASCII art and a real screenshot of the spiral
+arrangement can be seen below.
+
+ +-----------+-----------+ +-----------+-----------+
+ | | | | | |
+ | | 2 | | | 2 |
+ | | | | | |
+ | 1 +--+--+-----+ | 1 +-----+-----+
+ | | 5|-.| | | | | 4 |
+ | +--+--+ 3 | | | 3 +--+--+
+ | | 4 | | | | | 5|-.|
+ +-----------+-----+-----+ +-----------+-----+-----+
+ spiral dwindle
+
+[![dwm in spiral layout.][1]][2]
+
+*Links2, sic, xterm & xclock in spiral layout.*
+
+## Usage
+
+ 1. Download the patch and apply according to the [general instructions](.).
+ 2. Include the `fibonacci.c` source file and add `spiral` and/or `dwindle` to
+ the `Layout` section of your `config.h` file.
+ Example from `config.default.h`:
+
+ #include "fibonacci.c"
+ static Layout layout[] = { \
+ /* symbol function */ \
+ { "[]=", tile }, /* first entry is default */ \
+ { "><>", floating }, \
+ { "(_AT_)", spiral }, \
+ { "[\\]", dwindle }, \
+ };
+
+## Download
+
+ * [dwm-5.2-fibonacci.diff][5] (1.9k) (20081003)
+ * [dwm-5.1-fibonacci.diff][3] (1.9k) (20080731)
+
+## Author
+
+ * Jeroen Schot - <schot_AT_a-eskwadraat.nl>
+
+Joe Thornber's spiral tiling for [Xmonad][4] formed the inspiration for this
+patch. Thanks to Jan Christoph Ebersbach for updating this patch for versions
+4.5 to 4.9.
+
+[1]: http://schot.a-eskwadraat.nl/images/dwm-spiral_small.png
+[2]: http://schot.a-eskwadraat.nl/images/dwm-spiral.png
+[3]: http://schot.a-eskwadraat.nl/files/dwm-5.1-fibonacci.diff
+[4]: http://www.xmonad.org
+[5]: http://www.aplusbi.com/dwm/dwm-5.2-fibonacci.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/float_border_color.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/float_border_color.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,19 @@
+# FLOAT BORDER COLOR #
+
+## Description ##
+
+This patch allows you to specify a different border color for floating windows.
+
+## Download ##
+ * [dwm-5.0-float-border-color2.diff][3]
+ * [dwm-4.6-float-border-color2.diff][2]
+ * [dwm-4.5-float-border-color2.diff][1]
+
+## Author ##
+ * Message-ID: <20070626093131.GA5005_AT_shota.mine.nu>
+ * Updated by Jan Christoph Ebersbach - <jceb_AT_tzi.de>
+
+[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-float-border-color2.diff
+[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-float-border-color2.diff
+[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-float-border-color2.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/gridmode.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/gridmode.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,48 @@
+# GRIDMODE PATCH #
+
+## Description ##
+
+This patch adds an extra layout mode to dwm called `grid` in which the windows are arranged in a grid of windows of equal sizes. It comes very in handy especially with tools that operate on multiple windows at once such Cluster SSH.
+
+## Usage ##
+
+Add a grid-symbol to your `config.h` file.
+
+## Screenshots ##
+
+[Grid mode][5] (it also includes a minor patch to make dwm more colourful :D)
+
+## Download ##
+ * [dwm-5.2-gridmode.diff][11]
+ * [dwm-5.0-gridmode.diff][10]
+ * [dwm-4.7-gridmode.diff][9]
+ * [dwm-4.6-gridmode.diff][8]
+ * [dwm-4.5-gridmode.diff][7]
+ * [dwm-4.4.1-gridmode.diff][6]
+ * [dwm-4.3-gridmode.diff][4]
+ * [dwm-4.0-gridmode.diff][3]
+ * [dwm-3.9-gridmode.diff][2]
+ * [dwm-3.8-gridmode.diff][1]
+
+## Author ##
+
+ * Alexandru E. Ungur <grid_AT_rb.no-ip.biz>
+ * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+ * Updated to 5.2 & small fix by V4hn - v4hn.de
+Feedback is more than welcome :-)
+
+## Acknowledgments ##
+
+The patch would look a lot uglier without Jukka Salmi's constant help. Thanks Jukka :-)
+
+[1]: http://dwm.slax.no-ip.biz/dwm-3.8-gridmode.diff
+[2]: http://dwm.slax.no-ip.biz/dwm-3.9-gridmode.diff
+[3]: http://dwm.slax.no-ip.biz/dwm-4.0-gridmode.diff
+[4]: http://dwm.slax.no-ip.biz/dwm-4.3-gridmode.diff
+[5]: http://dwm.slax.no-ip.biz/dwm4.3.png
+[6]: http://schot.a-eskwadraat.nl/files/dwm-4.4.1-gridmode.diff
+[7]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-gridmode.diff
+[8]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-gridmode.diff
+[9]: http://www.e-jc.de/dwm/4.7/current/dwm-4.7-gridmode.diff
+[10]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-gridmode.diff
+[11]: http://www.v4hn.de/patches/dwm-5.2-gridmode.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/index.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,1 @@
+This section contains patches that do not apply to recent dwm versions.
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/mouseontitle.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/mouseontitle.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,33 @@
+MOUSE EVENTS ON TITLE
+=====================
+
+Last update: 2007-10-25
+
+Adds mouse events on the title bar to switch between clients using
+the mouse wheel and using the left click to zoom, right click kill
+and middle click for toggling the floating.
+
+This way you can easily manage tiled clients with the mouse.
+
+The right click on the layout area maximizes the client.
+
+If you are using the nmaster patch you will be able to change the nmaster value using the mouse wheel.
+
+Change the mwfact using the wheel at x=0 placing the cursor inside the bar.
+
+Patch
+-----
+
+Latest patch for [dwm 4.7][2] is here.
+For [dwm 4.6][1] take this one.
+
+See in event.c at function 'buttonpress()' to patch older dwm releases.
+
+AUTHOR
+------
+
+* pancake &lt;youterm.com&gt;
+
+[1]:http://news.nopcode.org/mouseontitle-4.6.diff
+[2]:http://news.nopcode.org/mouseontitle-4.7.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/moveresize.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/moveresize.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,64 @@
+MOVE RESIZE AND MAXIMIZE VERTICAL/HORIZONTAL PATCH
+==================================================
+
+Description
+-----------
+These patches provide helper functions for moving and resizing floating windows using keybindings.
+
+Configuration
+-------------
+This is a sample 'hjkl'-style configuration:
+
+ { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \
+ { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \
+ { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \
+ { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \
+ { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \
+ { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \
+ { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \
+ { MODKEY|ControlMask, XK_k, moveresize, "0x 15Y 0w 0h" }, \
+ { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \
+ { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \
+ { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \
+ { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \
+ { MODKEY|ControlMask|ShiftMask, XK_h, togglehorizontalmax, NULL }, \
+ { MODKEY|ControlMask|ShiftMask, XK_l, togglehorizontalmax, NULL }, \
+ { MODKEY|ControlMask|ShiftMask, XK_j, toggleverticalmax, NULL }, \
+ { MODKEY|ControlMask|ShiftMask, XK_k, toggleverticalmax, NULL }, \
+
+Download
+--------
+
+5.0
+
+ * [dwm-5.0-moveresize.diff][7]
+ * [dwm-5.0-maximize_vert_horz.diff][8]
+
+4.6
+
+ * [dwm-4.6-moveresize.diff][5]
+ * [dwm-4.6-maximize_vert_horz.diff][6]
+
+4.5
+
+ * [dwm-4.5-moveresize.diff][3]
+ * [dwm-4.5-maximize_vert_horz.diff][4]
+
+4.4
+
+ * [dwm-4.4-moveresize.diff][1]
+ * [dwm-4.4-maximize_vert_horz.diff][2]
+
+Author
+------
+ * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+
+[1]: http://www.e-jc.de/dwm/dwm-4.4-moveresize.diff
+[2]: http://www.e-jc.de/dwm/dwm-4.4-maximize_vert_horz.diff
+[3]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-moveresize.diff
+[4]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-maximize_vert_horz.diff
+[5]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-moveresize.diff
+[6]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-maximize_vert_horz.diff
+[7]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-moveresize.diff
+[8]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-maximize_vert_horz.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/movestack.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/movestack.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,32 @@
+# MOVESTACK
+
+## Description
+
+This plugin allows you to move clients around in the stack and swap them with
+the master. It emulates the behavior off mod+shift+j and mod+shift+k in Xmonad.
+movestack(+1) will swap the client with the current focus with the next client.
+movestack(-1) will swap the client with the current focus with the previous client.
+
+## Usage
+
+ 1. Download the patch and apply according to the [general instructions](.).
+ 2. Include the `movestack.c` source file and add keys that call movestack.
+ Example from `config.default.h`:
+
+ #include "movestack.c"
+ static Key keys[] = {
+ /* modifier key function argument */
+ ...
+ { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
+ ...
+
+## Download
+
+ * [dwm-5.2-movestack.diff][1] (1.9k) (20081003)
+
+## Author
+
+ * Niki Yoshiuchi - <aplusbi_AT_gmail.com>
+
+[1]: http://www.aplusbi.com/dwm/dwm-5.2-movestack.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/pertag.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/pertag.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,27 @@
+# PERTAG #
+
+## Description ##
+
+More general approach of [taglayouts patch][3]. The patch keeps layout, mwfact, barpos and nmaster (if
+installed) per tag.
+
+## Download ##
+ * [dwm-5.4-pertag.diff][7]
+ * [dwm-5.2-pertag.diff][6]
+ * [dwm-5.1-pertag.diff][5]
+ * [dwm-5.0-pertag.diff][4]
+ * [dwm-4.6-pertag.diff][1]
+ * [dwm-4.6-pertag_nmaster.diff][2]
+
+## Author ##
+
+ * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+ * Updated by V4hn - v4hn.de
+
+[1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff
+[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff
+[3]: /dwm/patches/taglayouts.html
+[4]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-pertag.diff
+[5]: http://v4hn.de/patches/dwm-5.1-pertag.diff
+[6]: http://dwm.suckless.org/patches/dwm-5.2-pertag.diff
+[7]: http://dwm.suckless.org/patches/dwm-5.4-pertag.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/raiselower.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/raiselower.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,15 @@
+# RAISELOWER #
+
+## Description ##
+
+This patch enables you to raise or lower the selected floating window.
+
+## Download ##
+ * [dwm-5.0-raiselower.diff][1]
+
+## Author ##
+
+ * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+
+[1]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-raiselower.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/save_floats.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/save_floats.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,23 @@
+# SAVE FLOATS PATCH #
+
+## Description ##
+
+This patch saves size and position of every floating window before it is forced
+into tiled mode. If the window is made floating again, the old dimensions will
+be restored.
+
+## Download ##
+ * [dwm-5.0-save_floats.diff][4]
+ * [dwm-4.6-save_floats.diff][3]
+ * [dwm-4.5-save_floats.diff][2]
+ * [dwm-4.4-save_floats.diff][1]
+
+## Author ##
+ * http://nymu.net/patches
+ * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+
+[1]: http://www.e-jc.de/dwm/dwm-4.4-save_floats.diff
+[2]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-save_floats.diff
+[3]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-save_floats.diff
+[4]: http://www.e-jc.de/dwm/5.0/fb1833284e4b/dwm-5.0-save_floats.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/tagall.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/tagall.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,32 @@
+# TAG ALL #
+
+## Description ##
+
+Shortcut to move all (floating) windows from one tag to another.
+
+## Download ##
+ * [dwm-5.0-tagall.diff][3]
+ * [dwm-4.6-tagall.diff][2]
+ * [dwm-4.5-tagall.diff][1]
+
+## Configuration ##
+
+ * MODKEY+Shift+F1 moves all floating windows of the current tag to tag 1
+
+ { MODKEY|ShiftMask, XK_F1, tagall, "F1" }, \
+ ...
+ { MODKEY|ShiftMask, XK_F9, tagall, "F9" }, \
+
+ * MODKEY+Shift+F1 moves all windows of the current tag to tag 1
+
+ { MODKEY|ShiftMask, XK_F1, tagall, "1" }, \
+ ...
+ { MODKEY|ShiftMask, XK_F9, tagall, "9" }, \
+
+## Author ##
+ * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+
+[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-tagall.diff
+[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-tagall.diff
+[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-tagall.diff
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/taglayouts.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/taglayouts.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,27 @@
+# TAGLAYOUTS #
+
+## Description ##
+
+This patch enables one layout per tag in contrast of one layout for all tags. - A more general approach is the [pertag patch][4].
+
+## Download ##
+ * [taglayouts-4.6.diff][3] - static implementation of taglayouts (saves 7 LOCs)
+ * [dwm-4.6-taglayouts.diff][2]
+ * [dwm-4.5-taglayouts.diff][1]
+
+## Known Bugs ##
+
+ * If you had selected multiple tags and try to get back to them with the
+ viewprevtag method, keep in mind that the layout of the FIRST tag is used,
+ that was previously selected.
+
+## Author ##
+
+ * http://na.srck.net/dwm
+ * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
+
+[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-taglayouts.diff
+[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-taglayouts.diff
+[3]: http://news.nopcode.org/taglayouts-4.6.diff
+[4]: /dwm/patches/pertag.html
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/tilemovemouse.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/tilemovemouse.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,20 @@
+MOVE TILED WINDOW WITH MOUSE
+============================
+
+Description
+-----------
+tilemovemouse() lets you drag a client to a different position *without*
+floating it. Reordering windows this way is fun.
+
+ static Button buttons[] = {
+ /* click event mask button function argument */
+ { ClkClientWin, MODKEY, Button1, tilemovemouse, {0} },
+ };
+
+
+Download
+--------
+[tilemovemouse](http://lists.suckless.org/dwm/0903/7773.html)
+
+
+Last update: 2009-03-20
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/old_patches/workspaces.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/old_patches/workspaces.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,84 @@
+Workspaces
+==========
+
+*by [Jesus Galan (yiyus)](mailto:yiyu dot jgl at gmail>) (aug 30 21:41:42 CEST 2008)*
+
+Adds to dwm the functionality of remembering tagset, layout and mfact for a given number of workspaces. You can also define preconfigured workspaces.
+
+Code
+----
+
+Insert this code before your keys definitions in config.h or in an included .c file:
+
+ typedef struct Workspace Workspace;
+ struct Workspace {
+ unsigned int tagset;
+ Layout *lt;
+ float mfact;
+ };
+
+ static Workspace workspaces[] = {
+ /* tagset layout fact */
+ { (1 << 0), &layouts[0], 0.55},
+ { (1 << 0) | (1<< 8), &layouts[0], 0.75},
+ { (1 << 0) | (1<< 1) | (1<< 8), &layouts[1], 0},
+ { (1<< 8), &layouts[2], 0},
+ };
+
+ static unsigned int ws = 0;
+
+ static void
+ setws(int nws) {
+ workspaces[ws].tagset = tagset[seltags];
+ workspaces[ws].lt = lt[sellt];
+ workspaces[ws].mfact = (workspaces[ws].lt == &layouts[0]) ? mfact : 0;
+ if(nws < LENGTH(workspaces))
+ ws = nws;
+ if(workspaces[ws].tagset) {
+ tagset[seltags] = workspaces[ws].tagset;
+ lt[sellt] = workspaces[ws].lt;
+ if(workspaces[ws].mfact != 0)
+ mfact = workspaces[ws].mfact;
+ arrange();
+ }
+ }
+
+ static void
+ prevws(const Arg *arg) {
+ setws((ws == 0) ? LENGTH(workspaces) - 1 : ws - 1);
+ }
+
+ static void
+ nextws(const Arg *arg) {
+ setws((ws == LENGTH(workspaces) - 1) ? 0 : ws + 1);
+ }
+
+And then, you can define keys:
+
+ { MODKEY, XK_Tab, nextws, {0} },
+ { MODKEY|ShiftMask, XK_Tab, prevws, {0} },
+
+Or mouse buttons:
+
+ { ClkTagBar, 0, Button4, prevws, {0} },
+ { ClkTagBar, 0, Button5, nextws, {0} },
+
+Comments
+--------
+
+It is so easy to change the viewed tags, layout and mfact in dwm than having artifacts to remember them are not necessary, this patch is just an example of how it could be implemented, but it won't be updated for future releases.
+
+It should be easy to add to the workspaces the possibility to remember bar position too.
+
+It is not necessary to define all your workspaces (or any of them). You can perfectly do:
+
+ static Workspace workspaces[16] = {
+ /* tagset layout fact */
+ { (1 << 0), &layouts[0], 0.55},
+ { (1 << 0) | (1<< 8), &layouts[0], 0.75},
+ };
+
+or:
+
+ static Workspace workspaces[16];
+
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/altmovefocus.md
--- a/dwm.suckless.org/patches/altmovefocus.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,10 +0,0 @@
-ANOTHER FOCUS MOVING MODEL
-==========================
-
-Description
------------
-When a single tag is displayed, calling view() or tag() with it as an argument is useless. This patch enables moving focus forward with view() calls and backward with tag() instead of doing nothing. Of course, those who toggle several tags at time or just have more than 3-4 tags won't benefit much from such behaviour.
-
-Download
---------
-* [dwm-5.2-altmovefocus.diff](http://mkmks.org/files/patches/dwm-5.2-altmovefocus.diff)
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/boldfont.md
--- a/dwm.suckless.org/patches/boldfont.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,27 +0,0 @@
-BOLDFONT
-========
-
-Description
------------
-
-This patch makes dwm use a different font (specified as `boldfont` in
-`config.h`) for occupied tags, and titles of floating windows.
-
-It also removes the squares that now mark occupied tags and floating windows.
-
-Configuration
--------------
-
- static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
- static const char boldfont[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*";
-
-Download
---------
-
-- [dwm-5.2-boldfont.diff](http://novsak.name/files/dwm/dwm-5.2-boldfont.diff)
-- [dwm-5.1-boldfont.diff](http://novsak.name/files/dwm/dwm-5.1-boldfont.diff)
-
-Author
-------
-
-- Luka Novsak <[lukanovsak_AT_gmail.com](mailto:lukanovsak_AT_gmail.com)>
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/clientspertag.md
--- a/dwm.suckless.org/patches/clientspertag.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,54 +0,0 @@
-LIMIT CLIENTS PER TAG PATCH
-===========================
-
-Last update: 2007-10-25
-
-See [nmaster][2] for cpt on dwm-4.6.
-
-This patch allows you to limit the number of clients to be shown.
-This restriction only affects non-floating windows.
-
-This patch can be used as a 'set' or 'toggle' mode.
-
-Tips
-----
-
-* To show all windows put "-1" as argument value.
-* To only display floating windows put "0" as argument.
-* For a toggling pair put "^2".
-
-Configuration
--------------
-
-The MODKEY+w toggles between two visible tiled windows and MODKEY+SHIFT+w hides all tiled windows.
-
- { MODKEY|ShiftMask, XK_q, clientspertag, "0" }, \
- { MODKEY, XK_q, clientspertag, "^1" }, \
- { MODKEY, XK_w, clientspertag, "^2" }, \
- { MODKEY, XK_e, clientspertag, "^3" }, \
-
-Download
---------
-
-You can download this patch [dwm-4.4-cpt.patch](http://news.nopcode.org/dwm-4.4-cpt.patch) (3K)
-
-See [nmaster][1] for dwm-4.6.
-
-Here's a [patch][2] from <i>Ritesh Kumar</i> that modifies dwm.c to show cpt and total number of clients in the statusbar.
-
-TODO
-----
-
-* Maybe it should be renamed to "tiledlimit" or "clientslimit".
-* Think about a way to make the focused client always visible (enhanced monocle patch?)
-
-Feedback is welcome :)
-
-AUTHOR
-------
-
-* pancake -- pancake /at/ youterm /dot/ com
-
-[1]: /dwm/patches/nmaster.html
-[2]: http://news.nopcode.org/cptdwm-4.6.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/color_status_bar.md
--- a/dwm.suckless.org/patches/color_status_bar.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,35 +0,0 @@
-# COLOR STATUS BAR #
-
-## Description ##
-
-This patch adds some color to the status bar. It allows you to change the colorset of text portions from "norm" to "sel" (and back) and to invert the colorset (the foreground becomes the background color and vice versa).
-
-
-## Usage ##
-
-Download the patch and apply it according to the [general instructions](.). The patch will make the following changes:
-
- * colorstatus.c: adding the file
- * dwm.c: adding the include-line for 'colorstatus.c'
- * dwm.c ('drawbar' function): adding the int-variable 'stextw'
- * dwm.c ('drawbar' function): changing the 'drawtext' section for stext
-
-
-## Configuration ##
-
-The configuration is done in the file '.xinitrc', where you define the status bar text. You can add the following tags:
-
- * '[c]' (without quotes): toggles the colorset (norm -> sel or sel -> norm depending on the currently selected colorset)
- * '[i]' (without quotes): inverts the current colorset (fgcolor -> bgcolor and bgcolor -> fgcolor)
-
-The change is applied from the position of the tag onwards. To revert the change you have to set the same tag again.
-
-### Example ###
-echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr
-
-
-## Download ##
-
- * [dwm-5.2-colorstatus.diff](dwm-5.2-colorstatus.diff) (4.1k, 131 additional lines) (20081117)
- * [.xinitrc example](dwm-5.2-colorstatus.xinitrc) (0.8k) (20081117)
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/colored_status_text.md
--- a/dwm.suckless.org/patches/colored_status_text.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,60 +0,0 @@
-# COLORED STATUS TEXT #
-
-## Description ##
-
-This patch enables colored text in the status bar. It changes the way colors are defined in config.h, allowing the user to define multiple color combinations for use in their status script.
-
-## Configuration ##
-
-Download the patch and apply it according to the [general instructions](.).
-
-Modify the colors definition in 'config.h' to suit your needs. Make sure to define at least 3 colors as they will be used for 'normal', 'selected', and 'urgent' windows, respectively.
-
-## Usage ##
-
-Add code to your status script to output the raw characters '\x03' to switch to the 'urgent' color, or '\x04' to switch to the 4th defined color, etc. Note that the color indices in the status text are +1 from the definition in 'config.h' (because '\0' is the string terminator). To switch back to the normal text color use '\x01'.
-
-### Example ###
-
-The following definition in 'config.h':
-
- #define NUMCOLORS 4
- static const char colors[NUMCOLORS][ColLast][8] = {
- // border foreground background
- { "#000033", "#dddddd", "#000033" }, // normal
- { "#000088", "#ffffff", "#000088" }, // selected
- { "#ff0000", "#000000", "#ffff00" }, // urgent/warning (black on yellow)
- { "#ff0000", "#ffffff", "#ff0000" }, // error (white on red)
- // add more here
- };
-
-Coupled with a matching status script produces the following:
- ![Example Colored Status Text](dwm-5.3.1-statuscolors.png)
-
-A really silly example:
-
- echo -e "normal \x01 selected \x03 warning/urgent \x04 error \x01 back to normal text" | dwm
-
-An example status script snippet to take advantage of the colors:
-
- status=""
- if [$batperc -le 10]; then
- # use "warning" color
- status+="\x03 BAT: $batperc"
- elif [$batperc -le 5]; then
- # use "error" color
- status+="\x04 BAT: $batperc"
- else
- # default is normal color
- status+="BAT: $batperc"
- fi
-
- # switch back to normal color for date
- status+="\x01| "+$(date)
-
- echo -e $status
-
-## Download ##
-
- * [dwm-5.3.1-statuscolors.diff](dwm-5.3.1-statuscolors.diff)
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.2-colorstatus.diff
--- a/dwm.suckless.org/patches/dwm-5.2-colorstatus.diff Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,183 +0,0 @@
-diff -up dwm-5.2-original/colorstatus.c dwm-5.2-modified/colorstatus.c
---- /dev/null 2008-11-17 18:12:14.000000000 +0100
-+++ dwm-5.2-modified/colorstatus.c 2008-11-17 18:09:29.000000000 +0100
-_AT_@ -0,0 +1,144 @@
-+int
-+drawstatustext(int x) {
-+ char cd[] = "[c]", id[] = "[i]";
-+ char buf1[256] = {0};
-+ Bool parse = True;
-+ Bool cs = False, is = False;
-+ int stextw = 0;
-+
-+ strcpy(buf1, stext);
-+ while(parse) {
-+ char *cp = 0, *ip = 0;
-+
-+ cp = strstr(buf1, cd);
-+ ip = strstr(buf1, id);
-+ if(cp != NULL || ip != NULL) {
-+ char buf2[256] = {0}, buf3[256] = {0};
-+ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0;
-+
-+ if(cp != NULL)
-+ clen2 = cp - buf1;
-+ if(ip != NULL)
-+ ilen2 = ip - buf1;
-+ if(clen2 < 0) {
-+ len2 = ilen2;
-+ dlen = strlen(id);
-+ }
-+ else if(ilen2 < 0) {
-+ len2 = clen2;
-+ dlen = strlen(cd);
-+ }
-+ else if(clen2 < ilen2) {
-+ len2 = clen2;
-+ dlen = strlen(cd);
-+ }
-+ else {
-+ len2 = ilen2;
-+ dlen = strlen(id);
-+ }
-+ strncpy(buf2, buf1, len2);
-+ offset3 = len2 + dlen;
-+ len3 = strlen(buf1) - offset3;
-+ strncpy(buf3, buf1 + offset3, len3);
-+ if(buf2 != NULL && strlen(buf2) > 0)
-+ stextw = stextw + TEXTW(buf2);
-+
-+ memset(buf1, '\0', sizeof(buf1));
-+ strcpy(buf1, buf3);
-+ }
-+ else {
-+ stextw = stextw + TEXTW(buf1);
-+ parse = False;
-+ }
-+ }
-+ dc.x = ww - stextw;
-+
-+ memset(buf1, '\0', sizeof(buf1));
-+ strcpy(buf1, stext);
-+ parse = True;
-+ while(parse) {
-+ char *cp = 0, *ip = 0;
-+
-+ cp = strstr(buf1, cd);
-+ ip = strstr(buf1, id);
-+ if(cp != NULL || ip != NULL) {
-+ char buf2[256] = {0}, buf3[256] = {0};
-+ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0;
-+ Bool cs3 = cs, is3 = is;
-+
-+ if(cp != NULL)
-+ clen2 = cp - buf1;
-+ if(ip != NULL)
-+ ilen2 = ip - buf1;
-+ if(clen2 < 0) {
-+ len2 = ilen2;
-+ dlen = strlen(id);
-+ is3 = !is;
-+ }
-+ else if(ilen2 < 0) {
-+ len2 = clen2;
-+ dlen = strlen(cd);
-+ cs3 = !cs;
-+ }
-+ else if(clen2 < ilen2) {
-+ len2 = clen2;
-+ dlen = strlen(cd);
-+ cs3 = !cs;
-+ }
-+ else {
-+ len2 = ilen2;
-+ dlen = strlen(id);
-+ is3 = !is;
-+ }
-+
-+ strncpy(buf2, buf1, len2);
-+ offset3 = len2 + dlen;
-+ len3 = strlen(buf1) - offset3;
-+ strncpy(buf3, buf1 + offset3, len3);
-+ if(buf2 != NULL && strlen(buf2) > 0) {
-+ dc.w = TEXTW(buf2);
-+ if(cs) {
-+ if(is)
-+ drawtext(buf2, dc.sel, True);
-+ else
-+ drawtext(buf2, dc.sel, False);
-+ }
-+ else {
-+ if(is)
-+ drawtext(buf2, dc.norm, True);
-+ else
-+ drawtext(buf2, dc.norm, False);
-+ }
-+ dc.x = dc.x + dc.w;
-+ }
-+
-+ cs = cs3;
-+ is = is3;
-+ memset(buf1, '\0', sizeof(buf1));
-+ strcpy(buf1, buf3);
-+ }
-+ else {
-+ dc.w = TEXTW(buf1);
-+ dc.x = ww - dc.w;
-+ if(dc.x < x) {
-+ dc.x = x;
-+ dc.w = ww - x;
-+ }
-+ if(cs) {
-+ if(is)
-+ drawtext(buf1, dc.sel, True);
-+ else
-+ drawtext(buf1, dc.sel, False);
-+ }
-+ else {
-+ if(is)
-+ drawtext(buf1, dc.norm, True);
-+ else
-+ drawtext(buf1, dc.norm, False);
-+ }
-+ parse = False;
-+ }
-+ }
-+
-+ return(stextw);
-+}
-diff -up dwm-5.2-original/dwm.c dwm-5.2-modified/dwm.c
---- dwm-5.2-original/dwm.c 2008-09-09 21:46:17.000000000 +0200
-+++ dwm-5.2-modified/dwm.c 2008-11-17 18:09:29.000000000 +0100
-_AT_@ -239,6 +239,7 @@ static Layout *lt[] = { NULL, NULL };
- static Window root, barwin;
- /* configuration, allows nested code to access above variables */
- #include "config.h"
-+#include "colorstatus.c"
-
- /* compile-time check if all tags fit into an unsigned int bit array. */
- struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
-_AT_@ -495,6 +496,7 @@ drawbar(void) {
- unsigned int i, occ = 0, urg = 0;
- unsigned long *col;
- Client *c;
-+ int stextw = 0;
-
- for(c = clients; c; c = c->next) {
- occ |= c->tags;
-_AT_@ -517,13 +519,8 @@ drawbar(void) {
- }
- else
- x = dc.x;
-- dc.w = TEXTW(stext);
-- dc.x = ww - dc.w;
-- if(dc.x < x) {
-- dc.x = x;
-- dc.w = ww - x;
-- }
-- drawtext(stext, dc.norm, False);
-+ stextw = drawstatustext(x);
-+ dc.x = ww - stextw;
- if((dc.w = dc.x - x) > bh) {
- dc.x = x;
- if(sel) {
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc
--- a/dwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,24 +0,0 @@
-while true
-do
- datestr=`date '+%a, %x'`
- timestr=`date '+%H:%M'`
-
- cpuavgload=`uptime | sed -n 's/.*: //; s/, .*// p'`
-
- batcurrent=`sed -n 's/ mAh//; s/remaining[ a-z:]*// p' /proc/acpi/battery/BAT1/state`
- batfull=`sed -n 's/ mAh//; s/last full[ a-z:]*// p' /proc/acpi/battery/BAT1/info`
- batpercent=`echo "($batcurrent*100)/$batfull" | bc`
- if [ $batpercent -lt 10 ]
- then batpercent=`echo [c]$batpercent%[c]`
- else batpercent=`echo $batpercent%`
- fi
-
- audiofront=`amixer sget Front | sed -n 's/\] \[[^%]*\]//; s/[ ]*Front Left: Playback [0-9]* \[// p'`
-
- mailnew=`claws-mail --status inbox | sed -n 's/ [ 0-9ClawsMinotrug\.]*// p'`
-
- echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr
-
- sleep 2
-done | dwm
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.2-monocle_count.diff
--- a/dwm.suckless.org/patches/dwm-5.2-monocle_count.diff Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,32 +0,0 @@
---- dwm-5.2/dwm.c 2008-09-09 21:46:17.000000000 +0200
-+++ dwm-5.2-monocle_count/dwm.c 2008-10-13 00:04:38.000000000 +0200
-_AT_@ -491,7 +491,8 @@
-
- void
- drawbar(void) {
-- int x;
-+ int x, a= 0, s= 0;
-+ char posbuf[10];
- unsigned int i, occ = 0, urg = 0;
- unsigned long *col;
- Client *c;
-_AT_@ -517,6 +518,19 @@
- }
- else
- x = dc.x;
-+ if(lt[sellt]->arrange == monocle){
-+ dc.x= x;
-+ for(c= nexttiled(clients), a= 0, s= 0; c; c= nexttiled(c->next), a++)
-+ if(c == stack)
-+ s= a;
-+ if(!s && a)
-+ s= a;
-+ snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a);
-+ dc.w= TEXTW(posbuf);
-+ drawtext(posbuf, dc.norm, False);
-+ x= dc.x + dc.w;
-+ }
-+
- dc.w = TEXTW(stext);
- dc.x = ww - dc.w;
- if(dc.x < x) {
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.2-pertag.diff
--- a/dwm.suckless.org/patches/dwm-5.2-pertag.diff Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,123 +0,0 @@
---- dwm-5.2/dwm.c 2008-09-09 21:46:17.000000000 +0200
-+++ dwm-5.2-pertag/dwm.c 2008-10-12 23:53:30.000000000 +0200
-_AT_@ -240,6 +240,11 @@
- /* configuration, allows nested code to access above variables */
- #include "config.h"
-
-+static int curtag = 1, prevtag = 1;
-+static Layout *lts[LENGTH(tags) + 1];
-+static double mfacts[LENGTH(tags) + 1];
-+static Bool showbars[LENGTH(tags) + 1];
-+
- /* compile-time check if all tags fit into an unsigned int bit array. */
- struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
-
-_AT_@ -1272,7 +1277,7 @@
- if(!arg || !arg->v || arg->v != lt[sellt])
- sellt ^= 1;
- if(arg && arg->v)
-- lt[sellt] = (Layout *)arg->v;
-+ lt[sellt] = lts[curtag] = (Layout *)arg->v;
- if(sel)
- arrange();
- else
-_AT_@ -1289,7 +1294,7 @@
- f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0;
- if(f < 0.1 || f > 0.9)
- return;
-- mfact = f;
-+ mfact = mfacts[curtag] = f;
- arrange();
- }
-
-_AT_@ -1337,12 +1342,27 @@
- if(!dc.font.set)
- XSetFont(dpy, dc.gc, dc.font.xfont->fid);
-
-+ /* init mfacts */
-+ for(i=0; i < LENGTH(tags) + 1 ; i++) {
-+ mfacts[i] = mfact;
-+ }
-+
-+ /* init layouts */
-+ for(i=0; i < LENGTH(tags) + 1; i++) {
-+ lts[i] = &layouts[0];
-+ }
-+
-+
- /* init bar */
- for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
- w = TEXTW(layouts[i].symbol);
- blw = MAX(blw, w);
- }
-
-+ for(i=0; i < LENGTH(tags) + 1; i++) {
-+ showbars[i] = showbar;
-+ }
-+
- wa.override_redirect = 1;
- wa.background_pixmap = ParentRelative;
- wa.event_mask = ButtonPressMask|ExposureMask;
-_AT_@ -1457,7 +1477,7 @@
-
- void
- togglebar(const Arg *arg) {
-- showbar = !showbar;
-+ showbar = showbars[curtag] = !showbar;
- updategeom();
- updatebar();
- arrange();
-_AT_@ -1490,9 +1510,23 @@
- void
- toggleview(const Arg *arg) {
- unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK);
-+ unsigned int i;
-
- if(mask) {
-+ if(mask == ~0) {
-+ prevtag = curtag;
-+ curtag = 0;
-+ }
-+ if(!(mask & 1 << (curtag - 1))) {
-+ prevtag = curtag;
-+ for (i=0; !(mask & 1 << i); i++);
-+ curtag = i + 1;
-+ }
- tagset[seltags] = mask;
-+ lt[sellt] = lts[curtag];
-+ mfact = mfacts[curtag];
-+ if (showbar != showbars[curtag])
-+ togglebar(NULL);
- clearurgent();
- arrange();
- }
-_AT_@ -1661,11 +1695,28 @@
-
- void
- view(const Arg *arg) {
-+ unsigned int i;
- if((arg->ui & TAGMASK) == tagset[seltags])
- return;
- seltags ^= 1; /* toggle sel tagset */
-- if(arg->ui & TAGMASK)
-+ if(arg->ui & TAGMASK) {
- tagset[seltags] = arg->ui & TAGMASK;
-+ prevtag = curtag;
-+ if(arg->ui == ~0)
-+ curtag = 0;
-+ else {
-+ for (i=0; !(arg->ui & 1 << i); i++);
-+ curtag = i + 1;
-+ }
-+ } else {
-+ prevtag= curtag ^ prevtag;
-+ curtag^= prevtag;
-+ prevtag= curtag ^ prevtag;
-+ }
-+ lt[sellt]= lts[curtag];
-+ mfact = mfacts[curtag];
-+ if(showbar != showbars[curtag])
-+ togglebar(NULL);
- clearurgent();
- arrange();
- }
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.3.1-statuscolors.diff
--- a/dwm.suckless.org/patches/dwm-5.3.1-statuscolors.diff Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,228 +0,0 @@
-diff -r 94032e7d3943 config.def.h
---- a/config.def.h Sat Dec 06 11:22:30 2008 +0000
-+++ b/config.def.h Sat Dec 06 11:24:26 2008 -0500
-_AT_@ -1,13 +1,16 @@
- /* See LICENSE file for copyright and license details. */
-
- /* appearance */
-+#define NUMCOLORS 4 // need at least 3
-+static const char colors[NUMCOLORS][ColLast][8] = {
-+ // border foreground background
-+ { "#cccccc", "#000000", "#cccccc" }, // 0 = normal
-+ { "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected
-+ { "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning
-+ { "#ff0000", "#ffffff", "#ff0000" }, // 3 = error
-+ // add more here
-+};
- static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
--static const char normbordercolor[] = "#cccccc";
--static const char normbgcolor[] = "#cccccc";
--static const char normfgcolor[] = "#000000";
--static const char selbordercolor[] = "#0066ff";
--static const char selbgcolor[] = "#0066ff";
--static const char selfgcolor[] = "#ffffff";
- static unsigned int borderpx = 1; /* border pixel of windows */
- static unsigned int snap = 32; /* snap pixel */
- static Bool showbar = True; /* False means no bar */
-_AT_@ -49,7 +52,7 @@
- #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
-
- /* commands */
--static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
-+static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
- static const char *termcmd[] = { "uxterm", NULL };
-
- static Key keys[] = {
-diff -r 94032e7d3943 dwm.c
---- a/dwm.c Sat Dec 06 11:22:30 2008 +0000
-+++ b/dwm.c Sat Dec 06 11:24:26 2008 -0500
-_AT_@ -52,6 +52,7 @@
- #define MAX(a, b) ((a) > (b) ? (a) : (b))
- #define MIN(a, b) ((a) < (b) ? (a) : (b))
- #define MAXTAGLEN 16
-+#define MAXCOLORS 8
- #define MOUSEMASK (BUTTONMASK|PointerMotionMask)
- #define WIDTH(x) ((x)->w + 2 * (x)->bw)
- #define HEIGHT(x) ((x)->h + 2 * (x)->bw)
-_AT_@ -97,8 +98,7 @@
-
- typedef struct {
- int x, y, w, h;
-- unsigned long norm[ColLast];
-- unsigned long sel[ColLast];
-+ unsigned long colors[MAXCOLORS][ColLast];
- Drawable drawable;
- GC gc;
- struct {
-_AT_@ -147,8 +147,9 @@
- static void detachstack(Client *c);
- static void die(const char *errstr, ...);
- static void drawbar(void);
--static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
--static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
-+static void drawcoloredtext(char *text);
-+static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
-+static void drawtext(const char *text, unsigned long col[ColLast], Bool pad);
- static void enternotify(XEvent *e);
- static void expose(XEvent *e);
- static void focus(Client *c);
-_AT_@ -501,14 +502,14 @@
- dc.x = 0;
- for(i = 0; i < LENGTH(tags); i++) {
- dc.w = TEXTW(tags[i]);
-- col = tagset[seltags] & 1 << i ? dc.sel : dc.norm;
-- drawtext(tags[i], col, urg & 1 << i);
-- drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, urg & 1 << i, col);
-+ col = dc.colors[ (tagset[seltags] & 1 << i ? 1 : (urg & 1 << i ? 2:0)) ];
-+ drawtext(tags[i], col, True);
-+ drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, col);
- dc.x += dc.w;
- }
- if(blw > 0) {
- dc.w = blw;
-- drawtext(lt[sellt]->symbol, dc.norm, False);
-+ drawtext(lt[sellt]->symbol, dc.colors[0], True);
- x = dc.x + dc.w;
- }
- else
-_AT_@ -519,27 +520,57 @@
- dc.x = x;
- dc.w = ww - x;
- }
-- drawtext(stext, dc.norm, False);
-+ drawcoloredtext(stext);
- if((dc.w = dc.x - x) > bh) {
- dc.x = x;
- if(sel) {
-- drawtext(sel->name, dc.sel, False);
-- drawsquare(sel->isfixed, sel->isfloating, False, dc.sel);
-+ drawtext(sel->name, dc.colors[1], True);
-+ drawsquare(sel->isfixed, sel->isfloating, dc.colors[1]);
- }
- else
-- drawtext(NULL, dc.norm, False);
-+ drawtext(NULL, dc.colors[0], True);
- }
- XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, ww, bh, 0, 0);
- XSync(dpy, False);
- }
-
- void
--drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) {
-+drawcoloredtext(char *text) {
-+ Bool first=True;
-+ char *buf = text, *ptr = buf, c = 1;
-+ unsigned long *col = dc.colors[0];
-+ int i, ox = dc.x;
-+
-+ while( *ptr ) {
-+ for( i = 0; *ptr < 0 || *ptr > NUMCOLORS; i++, ptr++);
-+ if( !*ptr ) break;
-+ c=*ptr;
-+ *ptr=0;
-+ if( i ) {
-+ dc.w = ww - dc.x;
-+ drawtext(buf, col, first);
-+ dc.x += textnw(buf, i) + textnw(&c,1);
-+ if( first ) dc.x += ( dc.font.ascent + dc.font.descent ) / 2;
-+ first = False;
-+ } else if( first ) {
-+ ox = dc.x += textnw(&c,1);
-+ }
-+ *ptr = c;
-+ col = dc.colors[ c-1 ];
-+ buf = ++ptr;
-+ }
-+ if( !first ) dc.x-=(dc.font.ascent+dc.font.descent)/2;
-+ drawtext(buf, col, True);
-+ dc.x = ox;
-+}
-+
-+void
-+drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) {
- int x;
- XGCValues gcv;
- XRectangle r = { dc.x, dc.y, dc.w, dc.h };
-
-- gcv.foreground = col[invert ? ColBG : ColFG];
-+ gcv.foreground = col[ ColFG ];
- XChangeGC(dpy, dc.gc, GCForeground, &gcv);
- x = (dc.font.ascent + dc.font.descent + 2) / 4;
- r.x = dc.x + 1;
-_AT_@ -555,18 +586,18 @@
- }
-
- void
--drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
-+drawtext(const char *text, unsigned long col[ColLast], Bool pad) {
- char buf[256];
- int i, x, y, h, len, olen;
- XRectangle r = { dc.x, dc.y, dc.w, dc.h };
-
-- XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]);
-+ XSetForeground(dpy, dc.gc, col[ ColBG ]);
- XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
- if(!text)
- return;
- olen = strlen(text);
-- h = dc.font.ascent + dc.font.descent;
-- y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
-+ h = pad ? (dc.font.ascent + dc.font.descent) : 0;
-+ y = dc.y + ((dc.h + dc.font.ascent - dc.font.descent) / 2);
- x = dc.x + (h / 2);
- /* shorten text if necessary */
- for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--);
-_AT_@ -575,7 +606,7 @@
- memcpy(buf, text, len);
- if(len < olen)
- for(i = len; i && i > len - 3; buf[--i] = '.');
-- XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
-+ XSetForeground(dpy, dc.gc, col[ ColFG ]);
- if(dc.font.set)
- XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
- else
-_AT_@ -609,7 +640,7 @@
- for(c = stack; c && !ISVISIBLE(c); c = c->snext);
- if(sel && sel != c) {
- grabbuttons(sel, False);
-- XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
-+ XSetWindowBorder(dpy, sel->win, dc.colors[0][ColBorder]);
- }
- if(c) {
- if(c->isurgent)
-_AT_@ -617,7 +648,7 @@
- detachstack(c);
- attachstack(c);
- grabbuttons(c, True);
-- XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
-+ XSetWindowBorder(dpy, c->win, dc.colors[1][ColBorder]);
- XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
- }
- else
-_AT_@ -878,7 +909,7 @@
-
- wc.border_width = c->bw;
- XConfigureWindow(dpy, w, CWBorderWidth, &wc);
-- XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
-+ XSetWindowBorder(dpy, w, dc.colors[0][ColBorder]);
- configure(c); /* propagates border_width, if size doesn't change */
- updatesizehints(c);
- XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
-_AT_@ -1329,12 +1360,11 @@
- cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
-
- /* init appearance */
-- dc.norm[ColBorder] = getcolor(normbordercolor);
-- dc.norm[ColBG] = getcolor(normbgcolor);
-- dc.norm[ColFG] = getcolor(normfgcolor);
-- dc.sel[ColBorder] = getcolor(selbordercolor);
-- dc.sel[ColBG] = getcolor(selbgcolor);
-- dc.sel[ColFG] = getcolor(selfgcolor);
-+ for(i=0; i<NUMCOLORS; i++) {
-+ dc.colors[i][ColBorder] = getcolor( colors[i][ColBorder] );
-+ dc.colors[i][ColFG] = getcolor( colors[i][ColFG] );
-+ dc.colors[i][ColBG] = getcolor( colors[i][ColBG] );
-+ }
- dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen));
- dc.gc = XCreateGC(dpy, root, 0, 0);
- XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.3.1-statuscolors.png
Binary file dwm.suckless.org/patches/dwm-5.3.1-statuscolors.png has changed
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/dwm-5.4-pertag.diff
--- a/dwm.suckless.org/patches/dwm-5.4-pertag.diff Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,123 +0,0 @@
-diff -r add6eb26ebaa dwm.c
---- a/dwm.c Sat Dec 20 12:02:14 2008 +0000
-+++ b/dwm.c Sun Dec 21 18:39:14 2008 +0100
-_AT_@ -240,6 +240,11 @@ static Window root, barwin;
- static Window root, barwin;
- /* configuration, allows nested code to access above variables */
- #include "config.h"
-+
-+static int curtag = 1, prevtag = 1;
-+static Layout *lts[LENGTH(tags) + 1];
-+static double mfacts[LENGTH(tags) + 1];
-+static Bool showbars[LENGTH(tags) + 1];
-
- /* compile-time check if all tags fit into an unsigned int bit array. */
- struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; };
-_AT_@ -1244,7 +1249,7 @@ setlayout(const Arg *arg) {
- if(!arg || !arg->v || arg->v != lt[sellt])
- sellt ^= 1;
- if(arg && arg->v)
-- lt[sellt] = (Layout *)arg->v;
-+ lt[sellt] = lts[curtag] = (Layout *)arg->v;
- if(sel)
- arrange();
- else
-_AT_@ -1261,7 +1266,7 @@ setmfact(const Arg *arg) {
- f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0;
- if(f < 0.1 || f > 0.9)
- return;
-- mfact = f;
-+ mfact = mfacts[curtag] = f;
- arrange();
- }
-
-_AT_@ -1309,11 +1314,26 @@ setup(void) {
- if(!dc.font.set)
- XSetFont(dpy, dc.gc, dc.font.xfont->fid);
-
-+ /* init mfacts */
-+ for(i=0; i < LENGTH(tags) + 1 ; i++) {
-+ mfacts[i] = mfact;
-+ }
-+
-+ /* init layouts */
-+ for(i=0; i < LENGTH(tags) + 1; i++) {
-+ lts[i] = &layouts[0];
-+ }
-+
-+
- /* init bar */
- for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
- w = TEXTW(layouts[i].symbol);
- blw = MAX(blw, w);
- }
-+
-+ for(i=0; i < LENGTH(tags) + 1; i++) {
-+ showbars[i] = showbar;
-+ }
-
- wa.override_redirect = 1;
- wa.background_pixmap = ParentRelative;
-_AT_@ -1434,7 +1454,7 @@ tile(void) {
-
- void
- togglebar(const Arg *arg) {
-- showbar = !showbar;
-+ showbar = showbars[curtag] = !showbar;
- updategeom();
- updatebar();
- arrange();
-_AT_@ -1467,9 +1487,23 @@ void
- void
- toggleview(const Arg *arg) {
- unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK);
-+ unsigned int i;
-
- if(mask) {
-+ if(mask == ~0) {
-+ prevtag = curtag;
-+ curtag = 0;
-+ }
-+ if(!(mask & 1 << (curtag - 1))) {
-+ prevtag = curtag;
-+ for (i=0; !(mask & 1 << i); i++);
-+ curtag = i + 1;
-+ }
- tagset[seltags] = mask;
-+ lt[sellt] = lts[curtag];
-+ mfact = mfacts[curtag];
-+ if (showbar != showbars[curtag])
-+ togglebar(NULL);
- arrange();
- }
- }
-_AT_@ -1644,11 +1678,28 @@ updatewmhints(Client *c) {
-
- void
- view(const Arg *arg) {
-+ unsigned int i;
- if((arg->ui & TAGMASK) == tagset[seltags])
- return;
- seltags ^= 1; /* toggle sel tagset */
-- if(arg->ui & TAGMASK)
-+ if(arg->ui & TAGMASK) {
- tagset[seltags] = arg->ui & TAGMASK;
-+ prevtag = curtag;
-+ if(arg->ui == ~0)
-+ curtag = 0;
-+ else {
-+ for (i=0; !(arg->ui & 1 << i); i++);
-+ curtag = i + 1;
-+ }
-+ } else {
-+ prevtag= curtag ^ prevtag;
-+ curtag^= prevtag;
-+ prevtag= curtag ^ prevtag;
-+ }
-+ lt[sellt]= lts[curtag];
-+ mfact = mfacts[curtag];
-+ if(showbar != showbars[curtag])
-+ togglebar(NULL);
- arrange();
- }
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/email_notifier_script.md
--- a/dwm.suckless.org/patches/email_notifier_script.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,62 +0,0 @@
-EMAIL NOTIFIER SCRIPT
-=====================
-
-Description
------------
-
-This init script is based on some ideas taken from the dwm ML. It adds email
-notification using `fetchmail`. It also adds the functionality of showing the
-content of the file `$HOME/.message` when it exists. This can be used for
-displaying info by other programs writing to this file.
-
-When a new email arrives a flashing text message is shown on the dwm's
-status bar.
-
-Config .fetchmailrc
--------------------
-This config works with GMail over IMAP with the IDLE extension for low bandwidth usage:
-
- poll imap.gmail.com port 993 proto IMAP user "<your_user>_AT_gmail.com"
- there with password "<your_pass>" keep ssl idle
-
-Init script
------------
-
-The notification is flashing during 60 seconds, then it is removed. Lines
-written to `.message` are displayed during a second in the status bar. If
-`.message` is deleted, the normal status message (date and uptime) returns.
-
-A pipe must be used with `fetchmail` when using IDLE extension because this way
-it waits for updates from the inbox not doing polling.
-If the `.message` file exists with some content, it is preserved and no email
-notification is shown.
-
- fetchmail --check 2>/dev/null | while read line; do
- new=`echo $line | sed 's/(//' | awk '{print $1-$3}'`
- if [ $new != 0 ] && [ ! -e ~/.message ]; then
- echo "New mail($new)" > ~/.message
- echo "!!! !!! !!!" >> ~/.message
- sleep 60
- if grep '^New mail' ~/.message >/dev/null 2>/dev/null; then
- rm -f ~/.message
- fi
- fi
- done &
- while true; do
- if [ -r ~/.message ]; then
- while read line; do
- xsetroot -name "$line"
- sleep 1
- done < ~/.message
- else
- xsetroot -name "`date` `uptime | sed 's/.*,//'`"
- sleep 1
- fi
- done &
- exec dwm
- rm -f ~/.message
-
-Author
-------
-
-- Ricardo Catalinas Jiménez <[jimenezrick_AT_gmail.com](mailto:jimenezrick_AT_gmail.com)>
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/fibonacci.md
--- a/dwm.suckless.org/patches/fibonacci.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,58 +0,0 @@
-# FIBONACCI LAYOUTS
-
-## Description
-
-This patch adds two new layouts (`spiral` and `dwindle`) that arranges all
-windows in Fibonacci tiles: The first window uses half the screen, the second
-the half of the remainder, etc. ASCII art and a real screenshot of the spiral
-arrangement can be seen below.
-
- +-----------+-----------+ +-----------+-----------+
- | | | | | |
- | | 2 | | | 2 |
- | | | | | |
- | 1 +--+--+-----+ | 1 +-----+-----+
- | | 5|-.| | | | | 4 |
- | +--+--+ 3 | | | 3 +--+--+
- | | 4 | | | | | 5|-.|
- +-----------+-----+-----+ +-----------+-----+-----+
- spiral dwindle
-
-[![dwm in spiral layout.][1]][2]
-
-*Links2, sic, xterm & xclock in spiral layout.*
-
-## Usage
-
- 1. Download the patch and apply according to the [general instructions](.).
- 2. Include the `fibonacci.c` source file and add `spiral` and/or `dwindle` to
- the `Layout` section of your `config.h` file.
- Example from `config.default.h`:
-
- #include "fibonacci.c"
- static Layout layout[] = { \
- /* symbol function */ \
- { "[]=", tile }, /* first entry is default */ \
- { "><>", floating }, \
- { "(_AT_)", spiral }, \
- { "[\\]", dwindle }, \
- };
-
-## Download
-
- * [dwm-5.2-fibonacci.diff][5] (1.9k) (20081003)
- * [dwm-5.1-fibonacci.diff][3] (1.9k) (20080731)
-
-## Author
-
- * Jeroen Schot - <schot_AT_a-eskwadraat.nl>
-
-Joe Thornber's spiral tiling for [Xmonad][4] formed the inspiration for this
-patch. Thanks to Jan Christoph Ebersbach for updating this patch for versions
-4.5 to 4.9.
-
-[1]: http://schot.a-eskwadraat.nl/images/dwm-spiral_small.png
-[2]: http://schot.a-eskwadraat.nl/images/dwm-spiral.png
-[3]: http://schot.a-eskwadraat.nl/files/dwm-5.1-fibonacci.diff
-[4]: http://www.xmonad.org
-[5]: http://www.aplusbi.com/dwm/dwm-5.2-fibonacci.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/float_border_color.md
--- a/dwm.suckless.org/patches/float_border_color.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,19 +0,0 @@
-# FLOAT BORDER COLOR #
-
-## Description ##
-
-This patch allows you to specify a different border color for floating windows.
-
-## Download ##
- * [dwm-5.0-float-border-color2.diff][3]
- * [dwm-4.6-float-border-color2.diff][2]
- * [dwm-4.5-float-border-color2.diff][1]
-
-## Author ##
- * Message-ID: <20070626093131.GA5005_AT_shota.mine.nu>
- * Updated by Jan Christoph Ebersbach - <jceb_AT_tzi.de>
-
-[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-float-border-color2.diff
-[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-float-border-color2.diff
-[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-float-border-color2.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/gridmode.md
--- a/dwm.suckless.org/patches/gridmode.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,48 +0,0 @@
-# GRIDMODE PATCH #
-
-## Description ##
-
-This patch adds an extra layout mode to dwm called `grid` in which the windows are arranged in a grid of windows of equal sizes. It comes very in handy especially with tools that operate on multiple windows at once such Cluster SSH.
-
-## Usage ##
-
-Add a grid-symbol to your `config.h` file.
-
-## Screenshots ##
-
-[Grid mode][5] (it also includes a minor patch to make dwm more colourful :D)
-
-## Download ##
- * [dwm-5.2-gridmode.diff][11]
- * [dwm-5.0-gridmode.diff][10]
- * [dwm-4.7-gridmode.diff][9]
- * [dwm-4.6-gridmode.diff][8]
- * [dwm-4.5-gridmode.diff][7]
- * [dwm-4.4.1-gridmode.diff][6]
- * [dwm-4.3-gridmode.diff][4]
- * [dwm-4.0-gridmode.diff][3]
- * [dwm-3.9-gridmode.diff][2]
- * [dwm-3.8-gridmode.diff][1]
-
-## Author ##
-
- * Alexandru E. Ungur <grid_AT_rb.no-ip.biz>
- * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
- * Updated to 5.2 & small fix by V4hn - v4hn.de
-Feedback is more than welcome :-)
-
-## Acknowledgments ##
-
-The patch would look a lot uglier without Jukka Salmi's constant help. Thanks Jukka :-)
-
-[1]: http://dwm.slax.no-ip.biz/dwm-3.8-gridmode.diff
-[2]: http://dwm.slax.no-ip.biz/dwm-3.9-gridmode.diff
-[3]: http://dwm.slax.no-ip.biz/dwm-4.0-gridmode.diff
-[4]: http://dwm.slax.no-ip.biz/dwm-4.3-gridmode.diff
-[5]: http://dwm.slax.no-ip.biz/dwm4.3.png
-[6]: http://schot.a-eskwadraat.nl/files/dwm-4.4.1-gridmode.diff
-[7]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-gridmode.diff
-[8]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-gridmode.diff
-[9]: http://www.e-jc.de/dwm/4.7/current/dwm-4.7-gridmode.diff
-[10]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-gridmode.diff
-[11]: http://www.v4hn.de/patches/dwm-5.2-gridmode.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/monocle_count.md
--- a/dwm.suckless.org/patches/monocle_count.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,12 +0,0 @@
-MONOCLE STACK COUNT
-====================
-
-Description
------------
-This patch provides a count of the number of stacks as well as the number of the current windows in the stack.
-This count is displayed in the statusbar as [CURRENT/TOTAL], e.g. [1/5], only when the monocle layout has been chosen.
-
-Download
---------
-* [dwm-5.2-monocle_count.diff](http://dwm.suckless.org/patches/dwm-5.2-monocle_count.diff)
-* [dwm-5.1-monocle_count.diff](http://v4hn.de/patches/dwm-5.1-monocle_count.diff)
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/mouseontitle.md
--- a/dwm.suckless.org/patches/mouseontitle.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,33 +0,0 @@
-MOUSE EVENTS ON TITLE
-=====================
-
-Last update: 2007-10-25
-
-Adds mouse events on the title bar to switch between clients using
-the mouse wheel and using the left click to zoom, right click kill
-and middle click for toggling the floating.
-
-This way you can easily manage tiled clients with the mouse.
-
-The right click on the layout area maximizes the client.
-
-If you are using the nmaster patch you will be able to change the nmaster value using the mouse wheel.
-
-Change the mwfact using the wheel at x=0 placing the cursor inside the bar.
-
-Patch
------
-
-Latest patch for [dwm 4.7][2] is here.
-For [dwm 4.6][1] take this one.
-
-See in event.c at function 'buttonpress()' to patch older dwm releases.
-
-AUTHOR
-------
-
-* pancake &lt;youterm.com&gt;
-
-[1]:http://news.nopcode.org/mouseontitle-4.6.diff
-[2]:http://news.nopcode.org/mouseontitle-4.7.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/moveresize.md
--- a/dwm.suckless.org/patches/moveresize.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,64 +0,0 @@
-MOVE RESIZE AND MAXIMIZE VERTICAL/HORIZONTAL PATCH
-==================================================
-
-Description
------------
-These patches provide helper functions for moving and resizing floating windows using keybindings.
-
-Configuration
--------------
-This is a sample 'hjkl'-style configuration:
-
- { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \
- { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \
- { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \
- { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \
- { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \
- { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \
- { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \
- { MODKEY|ControlMask, XK_k, moveresize, "0x 15Y 0w 0h" }, \
- { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \
- { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \
- { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \
- { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \
- { MODKEY|ControlMask|ShiftMask, XK_h, togglehorizontalmax, NULL }, \
- { MODKEY|ControlMask|ShiftMask, XK_l, togglehorizontalmax, NULL }, \
- { MODKEY|ControlMask|ShiftMask, XK_j, toggleverticalmax, NULL }, \
- { MODKEY|ControlMask|ShiftMask, XK_k, toggleverticalmax, NULL }, \
-
-Download
---------
-
-5.0
-
- * [dwm-5.0-moveresize.diff][7]
- * [dwm-5.0-maximize_vert_horz.diff][8]
-
-4.6
-
- * [dwm-4.6-moveresize.diff][5]
- * [dwm-4.6-maximize_vert_horz.diff][6]
-
-4.5
-
- * [dwm-4.5-moveresize.diff][3]
- * [dwm-4.5-maximize_vert_horz.diff][4]
-
-4.4
-
- * [dwm-4.4-moveresize.diff][1]
- * [dwm-4.4-maximize_vert_horz.diff][2]
-
-Author
-------
- * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
-
-[1]: http://www.e-jc.de/dwm/dwm-4.4-moveresize.diff
-[2]: http://www.e-jc.de/dwm/dwm-4.4-maximize_vert_horz.diff
-[3]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-moveresize.diff
-[4]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-maximize_vert_horz.diff
-[5]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-moveresize.diff
-[6]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-maximize_vert_horz.diff
-[7]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-moveresize.diff
-[8]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-maximize_vert_horz.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/movestack.md
--- a/dwm.suckless.org/patches/movestack.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,32 +0,0 @@
-# MOVESTACK
-
-## Description
-
-This plugin allows you to move clients around in the stack and swap them with
-the master. It emulates the behavior off mod+shift+j and mod+shift+k in Xmonad.
-movestack(+1) will swap the client with the current focus with the next client.
-movestack(-1) will swap the client with the current focus with the previous client.
-
-## Usage
-
- 1. Download the patch and apply according to the [general instructions](.).
- 2. Include the `movestack.c` source file and add keys that call movestack.
- Example from `config.default.h`:
-
- #include "movestack.c"
- static Key keys[] = {
- /* modifier key function argument */
- ...
- { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
- { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
- ...
-
-## Download
-
- * [dwm-5.2-movestack.diff][1] (1.9k) (20081003)
-
-## Author
-
- * Niki Yoshiuchi - <aplusbi_AT_gmail.com>
-
-[1]: http://www.aplusbi.com/dwm/dwm-5.2-movestack.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/pertag.md
--- a/dwm.suckless.org/patches/pertag.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,27 +0,0 @@
-# PERTAG #
-
-## Description ##
-
-More general approach of [taglayouts patch][3]. The patch keeps layout, mwfact, barpos and nmaster (if
-installed) per tag.
-
-## Download ##
- * [dwm-5.4-pertag.diff][7]
- * [dwm-5.2-pertag.diff][6]
- * [dwm-5.1-pertag.diff][5]
- * [dwm-5.0-pertag.diff][4]
- * [dwm-4.6-pertag.diff][1]
- * [dwm-4.6-pertag_nmaster.diff][2]
-
-## Author ##
-
- * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
- * Updated by V4hn - v4hn.de
-
-[1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff
-[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff
-[3]: /dwm/patches/taglayouts.html
-[4]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-pertag.diff
-[5]: http://v4hn.de/patches/dwm-5.1-pertag.diff
-[6]: http://dwm.suckless.org/patches/dwm-5.2-pertag.diff
-[7]: http://dwm.suckless.org/patches/dwm-5.4-pertag.diff
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/raiselower.md
--- a/dwm.suckless.org/patches/raiselower.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,15 +0,0 @@
-# RAISELOWER #
-
-## Description ##
-
-This patch enables you to raise or lower the selected floating window.
-
-## Download ##
- * [dwm-5.0-raiselower.diff][1]
-
-## Author ##
-
- * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
-
-[1]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-raiselower.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/save_floats.md
--- a/dwm.suckless.org/patches/save_floats.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,23 +0,0 @@
-# SAVE FLOATS PATCH #
-
-## Description ##
-
-This patch saves size and position of every floating window before it is forced
-into tiled mode. If the window is made floating again, the old dimensions will
-be restored.
-
-## Download ##
- * [dwm-5.0-save_floats.diff][4]
- * [dwm-4.6-save_floats.diff][3]
- * [dwm-4.5-save_floats.diff][2]
- * [dwm-4.4-save_floats.diff][1]
-
-## Author ##
- * http://nymu.net/patches
- * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
-
-[1]: http://www.e-jc.de/dwm/dwm-4.4-save_floats.diff
-[2]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-save_floats.diff
-[3]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-save_floats.diff
-[4]: http://www.e-jc.de/dwm/5.0/fb1833284e4b/dwm-5.0-save_floats.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/tagall.md
--- a/dwm.suckless.org/patches/tagall.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,32 +0,0 @@
-# TAG ALL #
-
-## Description ##
-
-Shortcut to move all (floating) windows from one tag to another.
-
-## Download ##
- * [dwm-5.0-tagall.diff][3]
- * [dwm-4.6-tagall.diff][2]
- * [dwm-4.5-tagall.diff][1]
-
-## Configuration ##
-
- * MODKEY+Shift+F1 moves all floating windows of the current tag to tag 1
-
- { MODKEY|ShiftMask, XK_F1, tagall, "F1" }, \
- ...
- { MODKEY|ShiftMask, XK_F9, tagall, "F9" }, \
-
- * MODKEY+Shift+F1 moves all windows of the current tag to tag 1
-
- { MODKEY|ShiftMask, XK_F1, tagall, "1" }, \
- ...
- { MODKEY|ShiftMask, XK_F9, tagall, "9" }, \
-
-## Author ##
- * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
-
-[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-tagall.diff
-[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-tagall.diff
-[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-tagall.diff
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/taglayouts.md
--- a/dwm.suckless.org/patches/taglayouts.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,27 +0,0 @@
-# TAGLAYOUTS #
-
-## Description ##
-
-This patch enables one layout per tag in contrast of one layout for all tags. - A more general approach is the [pertag patch][4].
-
-## Download ##
- * [taglayouts-4.6.diff][3] - static implementation of taglayouts (saves 7 LOCs)
- * [dwm-4.6-taglayouts.diff][2]
- * [dwm-4.5-taglayouts.diff][1]
-
-## Known Bugs ##
-
- * If you had selected multiple tags and try to get back to them with the
- viewprevtag method, keep in mind that the layout of the FIRST tag is used,
- that was previously selected.
-
-## Author ##
-
- * http://na.srck.net/dwm
- * Updated by Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
-
-[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-taglayouts.diff
-[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-taglayouts.diff
-[3]: http://news.nopcode.org/taglayouts-4.6.diff
-[4]: /dwm/patches/pertag.html
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/tilemovemouse.md
--- a/dwm.suckless.org/patches/tilemovemouse.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,20 +0,0 @@
-MOVE TILED WINDOW WITH MOUSE
-============================
-
-Description
------------
-tilemovemouse() lets you drag a client to a different position *without*
-floating it. Reordering windows this way is fun.
-
- static Button buttons[] = {
- /* click event mask button function argument */
- { ClkClientWin, MODKEY, Button1, tilemovemouse, {0} },
- };
-
-
-Download
---------
-[tilemovemouse](http://lists.suckless.org/dwm/0903/7773.html)
-
-
-Last update: 2009-03-20
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/patches/workspaces.md
--- a/dwm.suckless.org/patches/workspaces.md Mon Sep 07 18:24:59 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,84 +0,0 @@
-Workspaces
-==========
-
-*by [Jesus Galan (yiyus)](mailto:yiyu dot jgl at gmail>) (aug 30 21:41:42 CEST 2008)*
-
-Adds to dwm the functionality of remembering tagset, layout and mfact for a given number of workspaces. You can also define preconfigured workspaces.
-
-Code
-----
-
-Insert this code before your keys definitions in config.h or in an included .c file:
-
- typedef struct Workspace Workspace;
- struct Workspace {
- unsigned int tagset;
- Layout *lt;
- float mfact;
- };
-
- static Workspace workspaces[] = {
- /* tagset layout fact */
- { (1 << 0), &layouts[0], 0.55},
- { (1 << 0) | (1<< 8), &layouts[0], 0.75},
- { (1 << 0) | (1<< 1) | (1<< 8), &layouts[1], 0},
- { (1<< 8), &layouts[2], 0},
- };
-
- static unsigned int ws = 0;
-
- static void
- setws(int nws) {
- workspaces[ws].tagset = tagset[seltags];
- workspaces[ws].lt = lt[sellt];
- workspaces[ws].mfact = (workspaces[ws].lt == &layouts[0]) ? mfact : 0;
- if(nws < LENGTH(workspaces))
- ws = nws;
- if(workspaces[ws].tagset) {
- tagset[seltags] = workspaces[ws].tagset;
- lt[sellt] = workspaces[ws].lt;
- if(workspaces[ws].mfact != 0)
- mfact = workspaces[ws].mfact;
- arrange();
- }
- }
-
- static void
- prevws(const Arg *arg) {
- setws((ws == 0) ? LENGTH(workspaces) - 1 : ws - 1);
- }
-
- static void
- nextws(const Arg *arg) {
- setws((ws == LENGTH(workspaces) - 1) ? 0 : ws + 1);
- }
-
-And then, you can define keys:
-
- { MODKEY, XK_Tab, nextws, {0} },
- { MODKEY|ShiftMask, XK_Tab, prevws, {0} },
-
-Or mouse buttons:
-
- { ClkTagBar, 0, Button4, prevws, {0} },
- { ClkTagBar, 0, Button5, nextws, {0} },
-
-Comments
---------
-
-It is so easy to change the viewed tags, layout and mfact in dwm than having artifacts to remember them are not necessary, this patch is just an example of how it could be implemented, but it won't be updated for future releases.
-
-It should be easy to add to the workspaces the possibility to remember bar position too.
-
-It is not necessary to define all your workspaces (or any of them). You can perfectly do:
-
- static Workspace workspaces[16] = {
- /* tagset layout fact */
- { (1 << 0), &layouts[0], 0.55},
- { (1 << 0) | (1<< 8), &layouts[0], 0.75},
- };
-
-or:
-
- static Workspace workspaces[16];
-
diff -r 727e5aea9423 -r e7ab38fe25bb dwm.suckless.org/scripts/email_notifier_script.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/scripts/email_notifier_script.md Mon Sep 07 20:30:51 2009 +0100
_AT_@ -0,0 +1,62 @@
+EMAIL NOTIFIER SCRIPT
+=====================
+
+Description
+-----------
+
+This init script is based on some ideas taken from the dwm ML. It adds email
+notification using `fetchmail`. It also adds the functionality of showing the
+content of the file `$HOME/.message` when it exists. This can be used for
+displaying info by other programs writing to this file.
+
+When a new email arrives a flashing text message is shown on the dwm's
+status bar.
+
+Config .fetchmailrc
+-------------------
+This config works with GMail over IMAP with the IDLE extension for low bandwidth usage:
+
+ poll imap.gmail.com port 993 proto IMAP user "<your_user>_AT_gmail.com"
+ there with password "<your_pass>" keep ssl idle
+
+Init script
+-----------
+
+The notification is flashing during 60 seconds, then it is removed. Lines
+written to `.message` are displayed during a second in the status bar. If
+`.message` is deleted, the normal status message (date and uptime) returns.
+
+A pipe must be used with `fetchmail` when using IDLE extension because this way
+it waits for updates from the inbox not doing polling.
+If the `.message` file exists with some content, it is preserved and no email
+notification is shown.
+
+ fetchmail --check 2>/dev/null | while read line; do
+ new=`echo $line | sed 's/(//' | awk '{print $1-$3}'`
+ if [ $new != 0 ] && [ ! -e ~/.message ]; then
+ echo "New mail($new)" > ~/.message
+ echo "!!! !!! !!!" >> ~/.message
+ sleep 60
+ if grep '^New mail' ~/.message >/dev/null 2>/dev/null; then
+ rm -f ~/.message
+ fi
+ fi
+ done &
+ while true; do
+ if [ -r ~/.message ]; then
+ while read line; do
+ xsetroot -name "$line"
+ sleep 1
+ done < ~/.message
+ else
+ xsetroot -name "`date` `uptime | sed 's/.*,//'`"
+ sleep 1
+ fi
+ done &
+ exec dwm
+ rm -f ~/.message
+
+Author
+------
+
+- Ricardo Catalinas Jiménez <[jimenezrick_AT_gmail.com](mailto:jimenezrick_AT_gmail.com)>
Received on Mon Sep 07 2009 - 21:30:31 CEST

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