[wiki] [sites] [dwm][patch][status2d] Add background command || lhark

From: <git_AT_suckless.org>
Date: Wed, 26 Feb 2020 02:35:38 +0100

commit e3efdbaf42d116774249959211b8268acfa54cb1
Author: lhark <lhark_AT_ntymail.com>
Date: Tue Feb 25 20:34:38 2020 -0500

    [dwm][patch][status2d] Add background command

diff --git a/dwm.suckless.org/patches/status2d/dwm-status2d-6.2.diff b/dwm.suckless.org/patches/status2d/dwm-status2d-6.2.diff
index 932ada3b..ce7f53f1 100644
--- a/dwm.suckless.org/patches/status2d/dwm-status2d-6.2.diff
+++ b/dwm.suckless.org/patches/status2d/dwm-status2d-6.2.diff
_AT_@ -28,7 +28,7 @@ index d27cb67..464c9d6 100644
                  free(scheme[i]);
          XDestroyWindow(dpy, wmcheckwin);
          drw_free(drw);
-_AT_@ -690,6 +691,106 @@ dirtomon(int dir)
+_AT_@ -690,6 +691,114 @@ dirtomon(int dir)
          return m;
  }
  
_AT_@ -75,6 +75,7 @@ index d27cb67..464c9d6 100644
 +
 + drw_setscheme(drw, scheme[LENGTH(colors)]);
 + drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
++ drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
 + drw_rect(drw, x, 0, w, bh, 1, 1);
 + x++;
 +
_AT_@ -98,8 +99,15 @@ index d27cb67..464c9d6 100644
 + buf[7] = ' + drw_clr_create(drw, &drw->scheme[ColFg], buf);
 + i += 7;
++ } else if (text[i] == 'b') {
++ char buf[8];
++ memcpy(buf, (char*)text+i+1, 7);
++ buf[7] = '++ drw_clr_create(drw, &drw->scheme[ColBg], buf);
++ i += 7;
 + } else if (text[i] == 'd') {
 + drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
++ drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
 + } else if (text[i] == 'r') {
 + int rx = atoi(text + ++i);
 + while (text[++i] != ',');
diff --git a/dwm.suckless.org/patches/status2d/index.md b/dwm.suckless.org/patches/status2d/index.md
index 172f1cc4..f55bbd5b 100644
--- a/dwm.suckless.org/patches/status2d/index.md
+++ b/dwm.suckless.org/patches/status2d/index.md
_AT_@ -20,17 +20,20 @@ Usage
 
 * ^c#FF0000^: set foreground color.
 
-* ^f11^: forward the x draawing cursor, only needed for drawings, not text.
+* ^b#55cdfc^: set background color, only applies to text, use the ^r^ command to add backgrounds to your drawings
 
-* ^d^: reset foreground color to SchemeNorm.
+* ^f11^: forward the x drawing cursor, only needed for drawings, not text.
+
+* ^d^: reset colors to SchemeNorm.
 
 Example
 -------
-xsetroot -name "dwmstatus ^c#FF0000^ in red with red rectangle
-^r0,0,10,10^^f10^^c#FFFFFF^ and white text"
+xsetroot -name "[status2d] ^c#FF0000^red text with blue
+rectangle^c#55cdfc^^r3,3,14,14^^f20^^c#FFFFFF^^b#f7a8b8^
+and white text on pink background "
 
 Authors
 -------
 * [sipi](https://github.com/sipi)
-* lhark - <lhark_AT_ntymail.com> (6.2 port)
+* lhark - <lhark_AT_ntymail.com> (6.2 port, ^b^ command)
 
Received on Wed Feb 26 2020 - 02:35:38 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 26 2020 - 02:36:34 CET