dwm

dynamic window manager - with my changes
git clone https://pi.duncano.de/git/dwm.git
Log | Files | Refs | README | LICENSE

commit c4a5b3663a68d6b29bf1beb8f76a975564aaed10
parent d3970c59fe3adf12fb359ac8576fb49b630ed160
Author: Duncaen <mail@duncano.de>
Date:   Sat, 17 Jun 2017 10:24:09 +0200

Revert "add vtclr[16] which holds the default tty colors"

This reverts commit 2aa12ecafe5477be2c7f3e1d3bf1674b9dd05b64.

Diffstat:
dwm.c | 43-------------------------------------------
1 file changed, 0 insertions(+), 43 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -272,8 +272,6 @@ static Drw *drw; static Monitor *mons, *selmon; static Window root, wmcheckwin; -static char vtclr[16][8]; - /* configuration, allows nested code to access above variables */ #include "config.h" @@ -2091,46 +2089,6 @@ view(const Arg *arg) focus(NULL); } -static void -vtcolors(void) -{ - char buf[64]; - int rgb[3][16]; - char path[] = "/sys/module/vt/parameters/default_???"; - FILE *fp; - char *p, *suffix; - int *clr; - int i; - - suffix = "redgrnblu"; - memset(rgb, 0, sizeof rgb); - - for (clr = *rgb; clr < rgb[3];) { - path[34] = *suffix++; - path[35] = *suffix++; - path[36] = *suffix++; - - if (!(fp = fopen(path, "r"))) - die("can't open: %s\n", path); - - fgets(buf, sizeof buf, fp); - if (feof(fp) || ferror(fp)) - die("can't read colors: %s\n", path); - - for (p = buf; *p && clr < rgb[3]+16; p++) { - if (*p >= '0' && *p <= '9') - *clr = (*clr) * 10 + (*p) - '0'; - else - clr++; - } - - fclose(fp); - } - - for (i = 0; i < 16; i++) - snprintf(vtclr[i], 8, "#%02x%02x%02x", rgb[0][i], rgb[1][i], rgb[2][i]); -} - Client * wintoclient(Window w) { @@ -2262,7 +2220,6 @@ main(int argc, char *argv[]) fputs("warning: no locale support\n", stderr); if (!(dpy = XOpenDisplay(NULL))) die("dwm: cannot open display"); - vtcolors(); checkotherwm(); setup(); scan();