commit d70de1f4062be402d24c7b3d1c7fb675e20cf0b5
Author: Andrew Milkovich <[email protected]>
Date:   Tue Nov 10 14:47:14 2015 -0800

    update dualstatus patch for dwm 6.1 release

diff --git a/dwm.suckless.org/patches/dualstatus.md 
b/dwm.suckless.org/patches/dualstatus.md
index d09def0..58648a6 100644
--- a/dwm.suckless.org/patches/dualstatus.md
+++ b/dwm.suckless.org/patches/dualstatus.md
@@ -11,7 +11,7 @@ xsetroot -name "top text;bottom text"
 Download
 --------
 
- * [dwm-6.1-dualstatus.diff](dwm-6.1-dualstatus.diff) (4688b) (20130908)
+ * [dwm-6.1-dualstatus.diff](dwm-6.1-dualstatus.diff) (4683b) (20151110)
  * [dwm-6.0-dualstatus.diff](dwm-6.0-dualstatus.diff) (4794b) (20130908)
 
 Screenshot
diff --git a/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff 
b/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
index 96b8f66..1546b5a 100644
--- a/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
+++ b/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
@@ -1,16 +1,16 @@
 diff --git a/config.def.h b/config.def.h
-index eaae8f3..05ca3cb 100644
+index 7054c06..b96107a 100644
 --- a/config.def.h
 +++ b/config.def.h
-@@ -17,6 +17,7 @@ static const unsigned int borderpx  = 1;        /* border 
pixel of windows */
+@@ -15,6 +15,7 @@ static const unsigned int borderpx  = 1;        /* border 
pixel of windows */
  static const unsigned int snap      = 32;       /* snap pixel */
- static const Bool showbar           = True;     /* False means no bar */
- static const Bool topbar            = True;     /* False means bottom bar */
-+static const Bool extrabar          = True;     /* False means no extra bar */
+ static const int showbar            = 1;        /* 0 means no bar */
+ static const int topbar             = 1;        /* 0 means bottom bar */
++static const int extrabar           = 1;        /* 0 means no extra bar */
  
  /* tagging */
  static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
-@@ -64,6 +65,7 @@ static Key keys[] = {
+@@ -62,6 +63,7 @@ static Key keys[] = {
        { MODKEY,                       XK_p,      spawn,          {.v = 
dmenucmd } },
        { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = 
termcmd } },
        { MODKEY,                       XK_b,      togglebar,      {0} },
@@ -19,7 +19,7 @@ index eaae8f3..05ca3cb 100644
        { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
        { MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
 diff --git a/dwm.c b/dwm.c
-index 169adcb..0eae8b2 100644
+index 0362114..9b7cd74 100644
 --- a/dwm.c
 +++ b/dwm.c
 @@ -141,6 +141,13 @@ typedef struct {
@@ -28,14 +28,14 @@ index 169adcb..0eae8b2 100644
  
 +typedef struct {
 +      int y;
-+      Bool show;
++      int show;
 +      Window win;
 +      char text[256];
 +} Bar;
 +
  /* function declarations */
  static void applyrules(Client *c);
- static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool 
interact);
+ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int 
interact);
 @@ -210,6 +217,7 @@ static void tag(const Arg *arg);
  static void tagmon(const Arg *arg);
  static void tile(Monitor *);
@@ -52,24 +52,24 @@ index 169adcb..0eae8b2 100644
  
  /* configuration, allows nested code to access above variables */
  #include "config.h"
-@@ -469,6 +478,8 @@ cleanup(void) {
-               while(m->stack)
-                       unmanage(m->stack, False);
+@@ -477,6 +486,8 @@ cleanup(void)
+               while (m->stack)
+                       unmanage(m->stack, 0);
        XUngrabKey(dpy, AnyKey, AnyModifier, root);
 +      XUnmapWindow(dpy, eb.win);
 +      XDestroyWindow(dpy, eb.win);
-       while(mons)
+       while (mons)
                cleanupmon(mons);
-       drw_cur_free(drw, cursor[CurNormal]);
-@@ -568,6 +579,7 @@ configurenotify(XEvent *e) {
+       for (i = 0; i < CurLast; i++)
+@@ -578,6 +589,7 @@ configurenotify(XEvent *e)
                        updatebars();
-                       for(m = mons; m; m = m->next)
+                       for (m = mons; m; m = m->next)
                                XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, 
m->ww, bh);
 +                      XMoveResizeWindow(dpy, eb.win, mons->wx, eb.y, 
mons->ww, bh);
                        focus(NULL);
                        arrange(NULL);
                }
-@@ -738,6 +750,9 @@ drawbar(Monitor *m) {
+@@ -751,6 +763,9 @@ drawbar(Monitor *m)
                }
        }
        drw_map(drw, m->barwin, 0, 0, m->ww, bh);
@@ -79,19 +79,20 @@ index 169adcb..0eae8b2 100644
  }
  
  void
-@@ -1509,6 +1524,7 @@ setup(void) {
+@@ -1558,6 +1573,7 @@ setup(void)
        root = RootWindow(dpy, screen);
        drw = drw_create(dpy, screen, root, sw, sh);
        drw_load_fonts(drw, fonts, LENGTH(fonts));
 +      eb.show = extrabar;
        if (!drw->fontcount)
-               die("No fonts could be loaded.
");
+               die("no fonts could be loaded.
");
        bh = drw->fonts[0]->h + 2;
-@@ -1643,6 +1659,16 @@ togglebar(const Arg *arg) {
+@@ -1699,6 +1715,17 @@ togglebar(const Arg *arg)
  }
  
  void
-+toggleextrabar(const Arg *arg) {
++toggleextrabar(const Arg *arg)
++{
 +      if(selmon == mons) {
 +              eb.show = !eb.show;
 +              updatebarpos(selmon);
@@ -101,26 +102,26 @@ index 169adcb..0eae8b2 100644
 +}
 +
 +void
- togglefloating(const Arg *arg) {
-       if(!selmon->sel)
-               return;
-@@ -1747,6 +1773,13 @@ updatebars(void) {
+ togglefloating(const Arg *arg)
+ {
+       if (!selmon->sel)
+@@ -1810,6 +1837,13 @@ updatebars(void)
                XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
                XMapRaised(dpy, m->barwin);
        }
 +      if(!eb.win) {
 +              eb.win = XCreateWindow(dpy, root, mons->wx, eb.y, mons->ww, bh, 
0, DefaultDepth(dpy, screen),
-+                                     CopyFromParent, DefaultVisual(dpy, 
screen),
-+                                     
CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
++                                     CopyFromParent, DefaultVisual(dpy, 
screen),
++                                     
CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
 +              XDefineCursor(dpy, eb.win, cursor[CurNormal]->cursor);
 +              XMapRaised(dpy, eb.win);
 +      }
  }
  
  void
-@@ -1760,6 +1793,13 @@ updatebarpos(Monitor *m) {
-       }
-       else
+@@ -1823,6 +1857,13 @@ updatebarpos(Monitor *m)
+               m->wy = m->topbar ? m->wy + bh : m->wy;
+       } else
                m->by = -bh;
 +      if(m == mons && eb.show) {
 +              m->wh -= bh;
@@ -132,11 +133,11 @@ index 169adcb..0eae8b2 100644
  }
  
  void
-@@ -1932,8 +1972,21 @@ updatetitle(Client *c) {
- 
+@@ -1992,8 +2033,21 @@ updatetitle(Client *c)
  void
- updatestatus(void) {
--      if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
+ updatestatus(void)
+ {
+-      if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
 +      char text[512];
 +      if(!gettextprop(root, XA_WM_NAME, text, sizeof(text))) {
                strcpy(stext, "dwm-"VERSION);


Reply via email to