[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Mon, 28 Sep 2009 19:35:16 +0000 (UTC)

changeset: 278:d79b1497ecbe
tag: tip
user: Sidney Amani <seed_AT_uffs.org>
date: Mon Sep 28 21:35:16 2009 +0200
files: dwm.suckless.org/patches/dwm-5.7.2-pertag.diff dwm.suckless.org/patches/pertag.md
description:
Adding dwm-5.7.2 pertag patch


diff -r ee6796d6cea1 -r d79b1497ecbe dwm.suckless.org/patches/dwm-5.7.2-pertag.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.7.2-pertag.diff Mon Sep 28 21:35:16 2009 +0200
_AT_@ -0,0 +1,176 @@
+diff -r 15761ac5e2f1 dwm.c
+--- a/dwm.c Sun Sep 27 20:20:10 2009 +0100
++++ b/dwm.c Mon Sep 28 21:27:13 2009 +0200
+_AT_@ -120,26 +120,6 @@
+ void (*arrange)(Monitor *);
+ } Layout;
+
+-struct Monitor {
+- char ltsymbol[16];
+- float mfact;
+- int num;
+- int by; /* bar geometry */
+- int mx, my, mw, mh; /* screen size */
+- int wx, wy, ww, wh; /* window area */
+- unsigned int seltags;
+- unsigned int sellt;
+- unsigned int tagset[2];
+- Bool showbar;
+- Bool topbar;
+- Client *clients;
+- Client *sel;
+- Client *stack;
+- Monitor *next;
+- Window barwin;
+- const Layout *lt[2];
+-};
+-
+ typedef struct {
+ const char *class;
+ const char *instance;
+_AT_@ -273,6 +253,31 @@
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
+
++struct Monitor {
++ char ltsymbol[16];
++ float mfact;
++ int num;
++ int by; /* bar geometry */
++ int mx, my, mw, mh; /* screen size */
++ int wx, wy, ww, wh; /* window area */
++ unsigned int seltags;
++ unsigned int sellt;
++ unsigned int tagset[2];
++ Bool showbar;
++ Bool topbar;
++ Client *clients;
++ Client *sel;
++ Client *stack;
++ Monitor *next;
++ Window barwin;
++ const Layout *lt[2];
++ int curtag;
++ int prevtag;
++ const Layout *lts[LENGTH(tags) + 1];
++ double mfacts[LENGTH(tags) + 1];
++ Bool showbars[LENGTH(tags) + 1];
++};
++
+ /* compile-time check if all tags fit into an unsigned int bit array. */
+ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
+
+_AT_@ -1450,7 +1455,7 @@
+ if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
+ selmon->sellt ^= 1;
+ if(arg && arg->v)
+- selmon->lt[selmon->sellt] = (Layout *)arg->v;
++ selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag] = (Layout *)arg->v;
+ strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
+ if(selmon->sel)
+ arrange(selmon);
+_AT_@ -1475,6 +1480,8 @@
+ void
+ setup(void) {
+ XSetWindowAttributes wa;
++ Monitor *m;
++ unsigned int i;
+
+ /* clean up any zombies immediately */
+ sigchld(0);
+_AT_@ -1509,7 +1516,27 @@
+ XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
+ if(!dc.font.set)
+ XSetFont(dpy, dc.gc, dc.font.xfont->fid);
++ /* init tags */
++ for(m = mons; m; m = m->next)
++ m->curtag = m->prevtag = 1;
++ /* init mfacts */
++ for(m = mons; m; m = m->next) {
++ for(i=0; i < LENGTH(tags) + 1 ; i++) {
++ m->mfacts[i] = m->mfact;
++ }
++ }
++ /* init layouts */
++ for(m = mons; m; m = m->next) {
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ m->lts[i] = &layouts[0];
++ }
++ }
+ /* init bars */
++ for(m = mons; m; m = m->next) {
++ for(i=0; i < LENGTH(tags) + 1; i++) {
++ m->showbars[i] = m->showbar;
++ }
++ }
+ updatebars();
+ updatestatus();
+ /* EWMH support per view */
+_AT_@ -1620,7 +1647,7 @@
+
+ void
+ togglebar(const Arg *arg) {
+- selmon->showbar = !selmon->showbar;
++ selmon->showbar = selmon->showbars[selmon->curtag] = !selmon->showbar;
+ updatebarpos(selmon);
+ XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
+ arrange(selmon);
+_AT_@ -1640,12 +1667,27 @@
+ void
+ toggletag(const Arg *arg) {
+ unsigned int newtags;
++ unsigned int i;
+
+ if(!selmon->sel)
+ return;
+ newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
+ if(newtags) {
+ selmon->sel->tags = newtags;
++ if(newtags == ~0) {
++ selmon->prevtag = selmon->curtag;
++ selmon->curtag = 0;
++ }
++ if(!(newtags & 1 << (selmon->curtag - 1))) {
++ selmon->prevtag = selmon->curtag;
++ for (i=0; !(newtags & 1 << i); i++);
++ selmon->curtag = i + 1;
++ }
++ selmon->sel->tags = newtags;
++ selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag];
++ selmon->mfact = selmon->mfacts[selmon->curtag];
++ if (selmon->showbar != selmon->showbars[selmon->curtag])
++ togglebar(NULL);
+ arrange(selmon);
+ }
+ }
+_AT_@ -1912,11 +1954,29 @@
+
+ void
+ view(const Arg *arg) {
++ unsigned int i;
++
+ if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
+ return;
+ selmon->seltags ^= 1; /* toggle sel tagset */
+- if(arg->ui & TAGMASK)
++ if(arg->ui & TAGMASK) {
+ selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
++ selmon->prevtag = selmon->curtag;
++ if(arg->ui == ~0)
++ selmon->curtag = 0;
++ else {
++ for (i=0; !(arg->ui & 1 << i); i++);
++ selmon->curtag = i + 1;
++ }
++ } else {
++ selmon->prevtag= selmon->curtag ^ selmon->prevtag;
++ selmon->curtag^= selmon->prevtag;
++ selmon->prevtag= selmon->curtag ^ selmon->prevtag;
++ }
++ selmon->lt[selmon->sellt]= selmon->lts[selmon->curtag];
++ selmon->mfact = selmon->mfacts[selmon->curtag];
++ if(selmon->showbar != selmon->showbars[selmon->curtag])
++ togglebar(NULL);
+ arrange(selmon);
+ }
+
diff -r ee6796d6cea1 -r d79b1497ecbe dwm.suckless.org/patches/pertag.md
--- a/dwm.suckless.org/patches/pertag.md Sun Sep 27 18:22:47 2009 +0000
+++ b/dwm.suckless.org/patches/pertag.md Mon Sep 28 21:35:16 2009 +0200
_AT_@ -6,6 +6,7 @@
 installed) per tag.
 
 ## Download ##
+ * [dwm-5.7.2-pertag.diff][9]
  * [dwm-pertag-5.6.1.diff][8]
  * [dwm-5.4-pertag.diff][7]
  * [dwm-5.2-pertag.diff][6]
_AT_@ -19,6 +20,7 @@
  * Jan Christoph Ebersbach - <jceb_AT_e-jc.de>
  * Updated by V4hn - v4hn.de
  * Updated by Jerome Andrieux - <jerome_AT_gcu.info>
+ * Updated by Sidney Amani - <seed AT uffs.org>
 
 [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
_AT_@ -28,3 +30,4 @@
 [6]: http://dwm.suckless.org/patches/historical/dwm-5.2-pertag.diff
 [7]: http://dwm.suckless.org/patches/historical/dwm-5.4-pertag.diff
 [8]: http://dwm.suckless.org/patches/dwm-pertag-5.6.1.diff
+[9]: http://dwm.suckless.org/patches/dwm-5.7.2-pertag.diff
Received on Mon Sep 28 2009 - 21:35:16 CEST

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