[wiki] [sites] update dualstatus patch || Andrew Milkovich

From: <git_AT_suckless.org>
Date: Fri, 21 Aug 2015 03:03:19 +0200

commit 8012668de8c1dcd9a5ee8cf6325fa70261d42992
Author: Andrew Milkovich <amilkovich_AT_gmail.com>
Date: Thu Aug 20 18:03:05 2015 -0700

    update dualstatus patch

diff --git a/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff b/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
index d5ac540..96b8f66 100644
--- a/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
+++ b/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff
_AT_@ -1,8 +1,8 @@
 diff --git a/config.def.h b/config.def.h
-index 875885b..f319123 100644
+index eaae8f3..05ca3cb 100644
 --- a/config.def.h
 +++ b/config.def.h
-_AT_@ -12,6 +12,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
+_AT_@ -17,6 +17,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 */
_AT_@ -10,7 +10,7 @@ index 875885b..f319123 100644
  
  /* tagging */
  static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
-_AT_@ -59,6 +60,7 @@ static Key keys[] = {
+_AT_@ -64,6 +65,7 @@ static Key keys[] = {
          { MODKEY, XK_p, spawn, {.v = dmenucmd } },
          { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
          { MODKEY, XK_b, togglebar, {0} },
_AT_@ -19,10 +19,10 @@ index 875885b..f319123 100644
          { MODKEY, XK_k, focusstack, {.i = -1 } },
          { MODKEY, XK_i, incnmaster, {.i = +1 } },
 diff --git a/dwm.c b/dwm.c
-index 1bbb4b3..e0f4f44 100644
+index 169adcb..0eae8b2 100644
 --- a/dwm.c
 +++ b/dwm.c
-_AT_@ -140,6 +140,13 @@ typedef struct {
+_AT_@ -141,6 +141,13 @@ typedef struct {
          int monitor;
  } Rule;
  
_AT_@ -36,7 +36,7 @@ index 1bbb4b3..e0f4f44 100644
  /* function declarations */
  static void applyrules(Client *c);
  static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
-_AT_@ -209,6 +216,7 @@ static void tag(const Arg *arg);
+_AT_@ -210,6 +217,7 @@ static void tag(const Arg *arg);
  static void tagmon(const Arg *arg);
  static void tile(Monitor *);
  static void togglebar(const Arg *arg);
_AT_@ -44,8 +44,8 @@ index 1bbb4b3..e0f4f44 100644
  static void togglefloating(const Arg *arg);
  static void toggletag(const Arg *arg);
  static void toggleview(const Arg *arg);
-_AT_@ -266,6 +274,7 @@ static Drw *drw;
- static Fnt *fnt;
+_AT_@ -266,6 +274,7 @@ static Display *dpy;
+ static Drw *drw;
  static Monitor *mons, *selmon;
  static Window root;
 +static Bar eb;
_AT_@ -61,7 +61,7 @@ index 1bbb4b3..e0f4f44 100644
          while(mons)
                  cleanupmon(mons);
          drw_cur_free(drw, cursor[CurNormal]);
-_AT_@ -569,6 +580,7 @@ configurenotify(XEvent *e) {
+_AT_@ -568,6 +579,7 @@ configurenotify(XEvent *e) {
                          updatebars();
                          for(m = mons; m; m = m->next)
                                  XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
_AT_@ -69,7 +69,7 @@ index 1bbb4b3..e0f4f44 100644
                          focus(NULL);
                          arrange(NULL);
                  }
-_AT_@ -739,6 +751,9 @@ drawbar(Monitor *m) {
+_AT_@ -738,6 +750,9 @@ drawbar(Monitor *m) {
                  }
          }
          drw_map(drw, m->barwin, 0, 0, m->ww, bh);
_AT_@ -79,15 +79,15 @@ index 1bbb4b3..e0f4f44 100644
  }
  
  void
-_AT_@ -1503,6 +1518,7 @@ setup(void) {
- bh = fnt->h + 2;
+_AT_@ -1509,6 +1524,7 @@ setup(void) {
+ root = RootWindow(dpy, screen);
          drw = drw_create(dpy, screen, root, sw, sh);
- drw_setfont(drw, fnt);
+ drw_load_fonts(drw, fonts, LENGTH(fonts));
 + eb.show = extrabar;
- updategeom();
- /* init atoms */
- wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
-_AT_@ -1634,6 +1650,16 @@ togglebar(const Arg *arg) {
+ if (!drw->fontcount)
+ die("No fonts could be loaded.
");
+ bh = drw->fonts[0]->h + 2;
+_AT_@ -1643,6 +1659,16 @@ togglebar(const Arg *arg) {
  }
  
  void
_AT_@ -104,7 +104,7 @@ index 1bbb4b3..e0f4f44 100644
  togglefloating(const Arg *arg) {
          if(!selmon->sel)
                  return;
-_AT_@ -1738,6 +1764,13 @@ updatebars(void) {
+_AT_@ -1747,6 +1773,13 @@ updatebars(void) {
                  XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
                  XMapRaised(dpy, m->barwin);
          }
_AT_@ -118,7 +118,7 @@ index 1bbb4b3..e0f4f44 100644
  }
  
  void
-_AT_@ -1751,6 +1784,13 @@ updatebarpos(Monitor *m) {
+_AT_@ -1760,6 +1793,13 @@ updatebarpos(Monitor *m) {
          }
          else
                  m->by = -bh;
_AT_@ -132,7 +132,7 @@ index 1bbb4b3..e0f4f44 100644
  }
  
  void
-_AT_@ -1923,8 +1963,21 @@ updatetitle(Client *c) {
+_AT_@ -1932,8 +1972,21 @@ updatetitle(Client *c) {
  
  void
  updatestatus(void) {
Received on Fri Aug 21 2015 - 03:03:19 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 21 2015 - 03:12:11 CEST