[wiki] [sites] Move multimon to historical || Britton Leo Kerin

From: <git_AT_suckless.org>
Date: Mon, 18 Jul 2016 06:57:33 +0200

commit f3197bf1e7c4e907b7282e30b4f24bb2535ecf53
Author: Britton Leo Kerin <britton.kerin_AT_gmail.com>
Date: Sun Jul 17 20:57:19 2016 -0800

    Move multimon to historical

diff --git a/dwm.suckless.org/patches/historical/multimon-1-added-monitor-marker-to-bar.diff b/dwm.suckless.org/patches/historical/multimon-1-added-monitor-marker-to-bar.diff
new file mode 100644
index 0000000..a2dd1bc
--- /dev/null
+++ b/dwm.suckless.org/patches/historical/multimon-1-added-monitor-marker-to-bar.diff
_AT_@ -0,0 +1,163 @@
+From 143e7f2f3caa047469c7219cd6b0cb704466683f Mon Sep 17 00:00:00 2001
+From: "Gary B. Genett" <me_AT_garybgenett.net>
+Date: Mon, 24 Mar 2014 13:47:59 -0700
+Subject: added monitor marker to bar
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------1.8.3.2"
+
+This is a multi-part message in MIME format.
+--------------1.8.3.2
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ config.def.h | 2 ++
+ dwm.c | 13 +++++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+
+--------------1.8.3.2
+Content-Type: text/x-patch; name="0001-added-monitor-marker-to-bar.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-added-monitor-marker-to-bar.patch"
+
+diff --git a/config.def.h b/config.def.h
+index 875885b864986b6b2c190f9e05d979887e563f93..af6bcfae52a8d1783158ae4f38f35b88025c04e1 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -90,20 +90,22 @@ static Key keys[] = {
+ TAGKEYS( XK_9, 8)
+ { MODKEY|ShiftMask, XK_q, quit, {0} },
+ };
+
+ /* button definitions */
+ /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
+ static Button buttons[] = {
+ /* click event mask button function argument */
+ { ClkLtSymbol, 0, Button1, setlayout, {0} },
+ { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
++ { ClkMonNum, 0, Button1, focusmon, {.i = +1} },
++ { ClkMonNum, 0, Button3, focusmon, {.i = -1} },
+ { ClkWinTitle, 0, Button2, zoom, {0} },
+ { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
+ { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
+ { ClkTagBar, 0, Button1, view, {0} },
+ { ClkTagBar, 0, Button3, toggleview, {0} },
+ { ClkTagBar, MODKEY, Button1, tag, {0} },
+ { ClkTagBar, MODKEY, Button3, toggletag, {0} },
+ };
+diff --git a/dwm.c b/dwm.c
+index 1bbb4b35be25b0a10b8ffd093c55906b8aea96df..209dedc1417a29fb44c3ba5b6fa62f1b75b6a09f 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -56,21 +56,21 @@
+ #define TAGMASK ((1 << LENGTH(tags)) - 1)
+ #define TEXTW(X) (drw_font_getexts_width(drw->font, X, strlen(X)) + drw->font->h)
+
+ /* enums */
+ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+ enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */
+ enum { NetSupported, NetWMName, NetWMState,
+ NetWMFullscreen, NetActiveWindow, NetWMWindowType,
+ NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+ enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
+-enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
++enum { ClkTagBar, ClkLtSymbol, ClkMonNum, ClkStatusText, ClkWinTitle,
+ ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
+
+ typedef union {
+ int i;
+ unsigned int ui;
+ float f;
+ const void *v;
+ } Arg;
+
+ typedef struct {
+_AT_@ -231,21 +231,21 @@ static Monitor *wintomon(Window w);
+ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
+
+ /* variables */
+ static const char broken[] = "broken";
+ static char stext[256];
+ static int screen;
+ static int sw, sh; /* X display screen geometry width, height */
+-static int bh, blw = 0; /* bar geometry */
++static int bh, blw, bmw = 0; /* bar geometry */
+ static int (*xerrorxlib)(Display *, XErrorEvent *);
+ static unsigned int numlockmask = 0;
+ static void (*handler[LASTEvent]) (XEvent *) = {
+ [ButtonPress] = buttonpress,
+ [ClientMessage] = clientmessage,
+ [ConfigureRequest] = configurerequest,
+ [ConfigureNotify] = configurenotify,
+ [DestroyNotify] = destroynotify,
+ [EnterNotify] = enternotify,
+ [Expose] = expose,
+_AT_@ -425,20 +425,22 @@ buttonpress(XEvent *e) {
+ i = x = 0;
+ do
+ x += TEXTW(tags[i]);
+ while(ev->x >= x && ++i < LENGTH(tags));
+ if(i < LENGTH(tags)) {
+ click = ClkTagBar;
+ arg.ui = 1 << i;
+ }
+ else if(ev->x < x + blw)
+ click = ClkLtSymbol;
++ else if(ev->x < x + blw + bmw)
++ click = ClkMonNum;
+ else if(ev->x > selmon->ww - TEXTW(stext))
+ click = ClkStatusText;
+ else
+ click = ClkWinTitle;
+ }
+ else if((c = wintoclient(ev->window))) {
+ focus(c);
+ click = ClkClientWin;
+ }
+ for(i = 0; i < LENGTH(buttons); i++)
+_AT_@ -707,28 +709,35 @@ drawbar(Monitor *m) {
+ drw_setscheme(drw, m->tagset[m->seltags] & 1 << i ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, tags[i], urg & 1 << i);
+ drw_rect(drw, x, 0, w, bh, m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
+ occ & 1 << i, urg & 1 << i);
+ x += w;
+ }
+ w = blw = TEXTW(m->ltsymbol);
+ drw_setscheme(drw, &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, m->ltsymbol, 0);
+ x += w;
++ char custom[4] = {0}; // needs to be +1 of actual size, for some reason
++ snprintf(custom, sizeof(custom), "<%d>", m->num);
++ w = bmw = TEXTW(custom);
++ drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
++ drw_text(drw, x, 0, w, bh, custom, 0);
++ x += w;
+ xx = x;
+ if(m == selmon) { /* status is only drawn on selected monitor */
+ w = TEXTW(stext);
+ x = m->ww - w;
+ if(x < xx) {
+ x = xx;
+ w = m->ww - xx;
+ }
++ drw_setscheme(drw, &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, stext, 0);
+ }
+ else
+ x = m->ww;
+ if((w = x - xx) > bh) {
+ x = xx;
+ if(m->sel) {
+ drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, m->sel->name, 0);
+ drw_rect(drw, x, 0, w, bh, m->sel->isfixed, m->sel->isfloating, 0);
+
+--------------1.8.3.2--
+
+
diff --git a/dwm.suckless.org/patches/historical/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff b/dwm.suckless.org/patches/historical/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff
new file mode 100644
index 0000000..cdc5fc5
--- /dev/null
+++ b/dwm.suckless.org/patches/historical/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff
_AT_@ -0,0 +1,181 @@
+From 2521a74714bb7c4b8787f30584f1565cc582928b Mon Sep 17 00:00:00 2001
+From: "Gary B. Genett" <me_AT_garybgenett.net>
+Date: Mon, 24 Mar 2014 13:57:47 -0700
+Subject: added n*view wrappers, for unified multi-monitor
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------1.8.3.2"
+
+This is a multi-part message in MIME format.
+--------------1.8.3.2
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ config.def.h | 5 +++++
+ dwm.c | 24 ++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+
+
+--------------1.8.3.2
+Content-Type: text/x-patch; name="0002-added-n-view-wrappers-for-unified-multi-monitor.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0002-added-n-view-wrappers-for-unified-multi-monitor.patch"
+
+diff --git a/config.def.h b/config.def.h
+index af6bcfae52a8d1783158ae4f38f35b88025c04e1..d3b6a4b7bbf244a9d824d99340e5fc6d9ecb8a56 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -32,24 +32,27 @@ static const int nmaster = 1; /* number of clients in master area */
+ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
+
+ static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
+ };
+
+ /* key definitions */
++#define WINKEY Mod4Mask
+ #define MODKEY Mod1Mask
+ #define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
++ { MODKEY|WINKEY, KEY, nview, {.ui = 1 << TAG} }, \
++ { MODKEY|WINKEY|ControlMask, KEY, ntoggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
+
+ /* helper for spawning shell commands in the pre dwm-5.0 fashion */
+ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
+
+ /* commands */
+ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
+ static const char *termcmd[] = { "st", NULL };
+_AT_@ -99,14 +102,16 @@ static Button buttons[] = {
+ { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
+ { ClkMonNum, 0, Button1, focusmon, {.i = +1} },
+ { ClkMonNum, 0, Button3, focusmon, {.i = -1} },
+ { ClkWinTitle, 0, Button2, zoom, {0} },
+ { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
+ { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
+ { ClkTagBar, 0, Button1, view, {0} },
+ { ClkTagBar, 0, Button3, toggleview, {0} },
++ { ClkTagBar, MODKEY|WINKEY, Button1, nview, {0} },
++ { ClkTagBar, MODKEY|WINKEY, Button3, ntoggleview, {0} },
+ { ClkTagBar, MODKEY, Button1, tag, {0} },
+ { ClkTagBar, MODKEY, Button3, toggletag, {0} },
+ };
+
+diff --git a/dwm.c b/dwm.c
+index 209dedc1417a29fb44c3ba5b6fa62f1b75b6a09f..f6e9588d78a01e3263de54e94bd1559434a802c2 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -204,34 +204,36 @@ static void setmfact(const Arg *arg);
+ static void setup(void);
+ static void showhide(Client *c);
+ static void sigchld(int unused);
+ static void spawn(const Arg *arg);
+ static void tag(const Arg *arg);
+ static void tagmon(const Arg *arg);
+ static void tile(Monitor *);
+ static void togglebar(const Arg *arg);
+ static void togglefloating(const Arg *arg);
+ static void toggletag(const Arg *arg);
++static void ntoggleview(const Arg *arg);
+ static void toggleview(const Arg *arg);
+ static void unfocus(Client *c, Bool setfocus);
+ static void unmanage(Client *c, Bool destroyed);
+ static void unmapnotify(XEvent *e);
+ static Bool updategeom(void);
+ static void updatebarpos(Monitor *m);
+ static void updatebars(void);
+ static void updateclientlist(void);
+ static void updatenumlockmask(void);
+ static void updatesizehints(Client *c);
+ static void updatestatus(void);
+ static void updatewindowtype(Client *c);
+ static void updatetitle(Client *c);
+ static void updatewmhints(Client *c);
++static void nview(const Arg *arg);
+ static void view(const Arg *arg);
+ static Client *wintoclient(Window w);
+ static Monitor *wintomon(Window w);
+ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
+
+ /* variables */
+ static const char broken[] = "broken";
+_AT_@ -1663,20 +1665,31 @@ toggletag(const Arg *arg) {
+ return;
+ newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
+ if(newtags) {
+ selmon->sel->tags = newtags;
+ focus(NULL);
+ arrange(selmon);
+ }
+ }
+
+ void
++ntoggleview(const Arg *arg) {
++ const Arg n = {.i = +1};
++ const int mon = selmon->num;
++ do {
++ focusmon(&n);
++ toggleview(arg);
++ }
++ while (selmon->num != mon);
++}
++
++void
+ toggleview(const Arg *arg) {
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
+
+ if(newtagset) {
+ selmon->tagset[selmon->seltags] = newtagset;
+ focus(NULL);
+ arrange(selmon);
+ }
+ }
+
+_AT_@ -1961,20 +1974,31 @@ updatewmhints(Client *c) {
+ c->isurgent = (wmh->flags & XUrgencyHint) ? True : False;
+ if(wmh->flags & InputHint)
+ c->neverfocus = !wmh->input;
+ else
+ c->neverfocus = False;
+ XFree(wmh);
+ }
+ }
+
+ void
++nview(const Arg *arg) {
++ const Arg n = {.i = +1};
++ const int mon = selmon->num;
++ do {
++ focusmon(&n);
++ view(arg);
++ }
++ while (selmon->num != mon);
++}
++
++void
+ view(const Arg *arg) {
+ if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
+ return;
+ selmon->seltags ^= 1; /* toggle sel tagset */
+ if(arg->ui & TAGMASK)
+ selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ focus(NULL);
+ arrange(selmon);
+ }
+
+
+--------------1.8.3.2--
+
+
diff --git a/dwm.suckless.org/patches/historical/multimon-3-added-reset_view-function.diff b/dwm.suckless.org/patches/historical/multimon-3-added-reset_view-function.diff
new file mode 100644
index 0000000..375cac6
--- /dev/null
+++ b/dwm.suckless.org/patches/historical/multimon-3-added-reset_view-function.diff
_AT_@ -0,0 +1,168 @@
+From b9f79c3dd07b285e974b2dfdf2371a72467539bb Mon Sep 17 00:00:00 2001
+From: "Gary B. Genett" <me_AT_garybgenett.net>
+Date: Mon, 24 Mar 2014 14:27:40 -0700
+Subject: added reset_view function
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------1.8.3.2"
+
+This is a multi-part message in MIME format.
+--------------1.8.3.2
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ config.def.h | 8 ++++++++
+ dwm.c | 21 +++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+
+
+--------------1.8.3.2
+Content-Type: text/x-patch; name="0003-added-reset_view-function.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0003-added-reset_view-function.patch"
+
+diff --git a/config.def.h b/config.def.h
+index d3b6a4b7bbf244a9d824d99340e5fc6d9ecb8a56..92b1a461604c81c061f60780dc189a83dd697562 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -22,22 +22,28 @@ static const Rule rules[] = {
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating monitor */
+ { "Gimp", NULL, NULL, 0, True, -1 },
+ { "Firefox", NULL, NULL, 1 << 8, False, -1 },
+ };
+
+ /* layout(s) */
+ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
+ static const int nmaster = 1; /* number of clients in master area */
++static const int nviews = 1; /* number of tags highlighted by default */
+ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
+
++static const int master[1]; /* nmaster override per monitor */
++//static const int master[] = {1,-1}; /* monitor 0 = nmaster 1, monitor 1 = no nmaster (all vertical) */
++static const int views[1]; /* nviews override per monitor */
++//static const int views[] = {4,~0}; /* monitor 0 = nviews 4, monitor 1 = all (all highlighted) */
++
+ static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
+ };
+
+ /* key definitions */
+ #define WINKEY Mod4Mask
+ #define MODKEY Mod1Mask
+_AT_@ -84,30 +90,32 @@ static Key keys[] = {
+ { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
+ TAGKEYS( XK_1, 0)
+ TAGKEYS( XK_2, 1)
+ TAGKEYS( XK_3, 2)
+ TAGKEYS( XK_4, 3)
+ TAGKEYS( XK_5, 4)
+ TAGKEYS( XK_6, 5)
+ TAGKEYS( XK_7, 6)
+ TAGKEYS( XK_8, 7)
+ TAGKEYS( XK_9, 8)
++ { MODKEY, XK_grave, reset_view, {0} },
+ { MODKEY|ShiftMask, XK_q, quit, {0} },
+ };
+
+ /* button definitions */
+ /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
+ static Button buttons[] = {
+ /* click event mask button function argument */
+ { ClkLtSymbol, 0, Button1, setlayout, {0} },
+ { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
+ { ClkMonNum, 0, Button1, focusmon, {.i = +1} },
++ { ClkMonNum, 0, Button2, reset_view, {0} },
+ { ClkMonNum, 0, Button3, focusmon, {.i = -1} },
+ { ClkWinTitle, 0, Button2, zoom, {0} },
+ { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
+ { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
+ { ClkTagBar, 0, Button1, view, {0} },
+ { ClkTagBar, 0, Button3, toggleview, {0} },
+ { ClkTagBar, MODKEY|WINKEY, Button1, nview, {0} },
+ { ClkTagBar, MODKEY|WINKEY, Button3, ntoggleview, {0} },
+diff --git a/dwm.c b/dwm.c
+index f6e9588d78a01e3263de54e94bd1559434a802c2..2b3bf5f99c95180cfb5a3bb04b4181481fbe7bbd 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -227,20 +227,21 @@ static void updatewindowtype(Client *c);
+ static void updatetitle(Client *c);
+ static void updatewmhints(Client *c);
+ static void nview(const Arg *arg);
+ static void view(const Arg *arg);
+ static Client *wintoclient(Window w);
+ static Monitor *wintomon(Window w);
+ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
++static void reset_view(const Arg *arg);
+
+ /* variables */
+ static const char broken[] = "broken";
+ static char stext[256];
+ static int screen;
+ static int sw, sh; /* X display screen geometry width, height */
+ static int bh, blw, bmw = 0; /* bar geometry */
+ static int (*xerrorxlib)(Display *, XErrorEvent *);
+ static unsigned int numlockmask = 0;
+ static void (*handler[LASTEvent]) (XEvent *) = {
+_AT_@ -2069,28 +2070,48 @@ zoom(const Arg *arg) {
+
+ if(!selmon->lt[selmon->sellt]->arrange
+ || (selmon->sel && selmon->sel->isfloating))
+ return;
+ if(c == nexttiled(selmon->clients))
+ if(!c || !(c = nexttiled(c->next)))
+ return;
+ pop(c);
+ }
+
++void
++reset_view(const Arg *arg) {
++ const Arg n = {.i = +1};
++ const Arg m = {.f = 1 + mfact};
++ const int mon = selmon->num;
++ Arg i = {.i = 0};
++ Arg v = {.ui = 0};
++ do {
++ focusmon(&n);
++ i.i = (master[selmon->num] ? master[selmon->num] : nmaster) - selmon->nmaster;
++ incnmaster(&i);
++ setmfact(&m);
++ v.ui = (views[selmon->num] == ~0 ? ~0 : ((1 << (views[selmon->num] ? views[selmon->num] : nviews)) -1));
++ view(&v);
++ }
++ while (selmon->num != mon);
++}
++
+ int
+ main(int argc, char *argv[]) {
+ if(argc == 2 && !strcmp("-v", argv[1]))
+ die("dwm-"VERSION", © 2006-2012 dwm engineers, see LICENSE for details
");
+ else if(argc != 1)
+ die("usage: dwm [-v]
");
+ if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ fputs("warning: no locale support
", stderr);
+ if(!(dpy = XOpenDisplay(NULL)))
+ die("dwm: cannot open display
");
+ checkotherwm();
+ setup();
+ scan();
++ const Arg r = {0};
++ reset_view(&r);
+ run();
+ cleanup();
+ XCloseDisplay(dpy);
+ return EXIT_SUCCESS;
+ }
+
+--------------1.8.3.2--
+
+
diff --git a/dwm.suckless.org/patches/historical/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff b/dwm.suckless.org/patches/historical/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff
new file mode 100644
index 0000000..8e7107c
--- /dev/null
+++ b/dwm.suckless.org/patches/historical/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff
_AT_@ -0,0 +1,195 @@
+From d318ffdc7ab7a365e548776a1d8ed5ccbd67cd42 Mon Sep 17 00:00:00 2001
+From: "Gary B. Genett" <me_AT_garybgenett.net>
+Date: Mon, 24 Mar 2014 14:44:04 -0700
+Subject: added statusall toggle, replacing need for patch
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------1.8.3.2"
+
+This is a multi-part message in MIME format.
+--------------1.8.3.2
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ config.def.h | 1 +
+ dwm.c | 12 ++++++------
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+
+--------------1.8.3.2
+Content-Type: text/x-patch; name="0004-added-statusall-toggle-replacing-need-for-patch.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0004-added-statusall-toggle-replacing-need-for-patch.patch"
+
+diff --git a/config.def.h b/config.def.h
+index 92b1a461604c81c061f60780dc189a83dd697562..b4759a569dc23754dd240da51dd12607ae93e0f3 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -24,20 +24,21 @@ static const Rule rules[] = {
+ /* class instance title tags mask isfloating monitor */
+ { "Gimp", NULL, NULL, 0, True, -1 },
+ { "Firefox", NULL, NULL, 1 << 8, False, -1 },
+ };
+
+ /* layout(s) */
+ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
+ static const int nmaster = 1; /* number of clients in master area */
+ static const int nviews = 1; /* number of tags highlighted by default */
+ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
++static const Bool statusall = False;/* True means status is shown in all bars, not just active monitor */
+
+ static const int master[1]; /* nmaster override per monitor */
+ //static const int master[] = {1,-1}; /* monitor 0 = nmaster 1, monitor 1 = no nmaster (all vertical) */
+ static const int views[1]; /* nviews override per monitor */
+ //static const int views[] = {4,~0}; /* monitor 0 = nviews 4, monitor 1 = all (all highlighted) */
+
+ static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+diff --git a/dwm.c b/dwm.c
+index 2b3bf5f99c95180cfb5a3bb04b4181481fbe7bbd..92aa91a75a39cf1ed298a2279db9974a4f456129 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -719,21 +719,21 @@ drawbar(Monitor *m) {
+ drw_setscheme(drw, &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, m->ltsymbol, 0);
+ x += w;
+ char custom[4] = {0}; // needs to be +1 of actual size, for some reason
+ snprintf(custom, sizeof(custom), "<%d>", m->num);
+ w = bmw = TEXTW(custom);
+ drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, custom, 0);
+ x += w;
+ xx = x;
+- if(m == selmon) { /* status is only drawn on selected monitor */
++ if(m == selmon || statusall) { /* status is only drawn on selected monitor, unless statusall is true */
+ w = TEXTW(stext);
+ x = m->ww - w;
+ if(x < xx) {
+ x = xx;
+ w = m->ww - xx;
+ }
+ drw_setscheme(drw, &scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, stext, 0);
+ }
+ else
+_AT_@ -779,21 +779,21 @@ enternotify(XEvent *e) {
+ return;
+ focus(c);
+ }
+
+ void
+ expose(XEvent *e) {
+ Monitor *m;
+ XExposeEvent *ev = &e->xexpose;
+
+ if(ev->count == 0 && (m = wintomon(ev->window)))
+- drawbar(m);
++ statusall ? drawbars() : drawbar(m);
+ }
+
+ void
+ focus(Client *c) {
+ if(!c || !ISVISIBLE(c))
+ for(c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
+ /* was if(selmon->sel) */
+ if(selmon->sel && selmon->sel != c)
+ unfocus(selmon->sel, False);
+ if(c) {
+_AT_@ -1222,21 +1222,21 @@ propertynotify(XEvent *e) {
+ updatesizehints(c);
+ break;
+ case XA_WM_HINTS:
+ updatewmhints(c);
+ drawbars();
+ break;
+ }
+ if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
+ updatetitle(c);
+ if(c == c->mon->sel)
+- drawbar(c->mon);
++ statusall ? drawbars() : drawbar(c->mon);
+ }
+ if(ev->atom == netatom[NetWMWindowType])
+ updatewindowtype(c);
+ }
+ }
+
+ void
+ quit(const Arg *arg) {
+ running = False;
+ }
+_AT_@ -1325,21 +1325,21 @@ resizemouse(const Arg *arg) {
+ focus(NULL);
+ }
+ }
+
+ void
+ restack(Monitor *m) {
+ Client *c;
+ XEvent ev;
+ XWindowChanges wc;
+
+- drawbar(m);
++ statusall ? drawbars() : drawbar(m);
+ if(!m->sel)
+ return;
+ if(m->sel->isfloating || !m->lt[m->sellt]->arrange)
+ XRaiseWindow(dpy, m->sel->win);
+ if(m->lt[m->sellt]->arrange) {
+ wc.stack_mode = Below;
+ wc.sibling = m->barwin;
+ for(c = m->stack; c; c = c->snext)
+ if(!c->isfloating && ISVISIBLE(c)) {
+ XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
+_AT_@ -1475,21 +1475,21 @@ setfullscreen(Client *c, Bool fullscreen) {
+ void
+ setlayout(const Arg *arg) {
+ if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
+ selmon->sellt ^= 1;
+ if(arg && arg->v)
+ selmon->lt[selmon->sellt] = (Layout *)arg->v;
+ strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
+ if(selmon->sel)
+ arrange(selmon);
+ else
+- drawbar(selmon);
++ statusall ? drawbars() : drawbar(selmon);
+ }
+
+ /* arg > 1.0 will set mfact absolutly */
+ void
+ setmfact(const Arg *arg) {
+ float f;
+
+ if(!arg || !selmon->lt[selmon->sellt]->arrange)
+ return;
+ f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
+_AT_@ -1941,21 +1941,21 @@ updatetitle(Client *c) {
+ if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name))
+ gettextprop(c->win, XA_WM_NAME, c->name, sizeof c->name);
+ if(c->name[0] == '
Received on Mon Jul 18 2016 - 06:57:33 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 18 2016 - 07:00:23 CEST