Added bar color modification

This commit is contained in:
Mahesh Asolkar 2019-02-03 12:52:15 -08:00
parent d96449190a
commit 421f1b9d46
3 changed files with 15 additions and 8 deletions

View File

@ -23,7 +23,7 @@ static const char *colors[][3] = {
}; };
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "Media", "Tenor", "Root" }; static const char *tags[] = { "1", "2", "3", "4", "5", "6", "Media", "Remote", "Root" };
static const Rule rules[] = { static const Rule rules[] = {
/* xprop(1): /* xprop(1):

View File

@ -22,8 +22,8 @@ FREETYPEINC = /usr/include/freetype2
#FREETYPEINC = ${X11INC}/freetype2 #FREETYPEINC = ${X11INC}/freetype2
# includes and libs # includes and libs
INCS = -I${X11INC} -I${FREETYPEINC} INCS = -I. -I/usr/include -I${X11INC} -I${FREETYPEINC} `pkg-config --cflags xft pango pangoxft`
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} `pkg-config --libs xft pango pangoxft`
# flags # flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}

17
dwm.c
View File

@ -201,7 +201,7 @@ static void setfocus(Client *c);
static void setfullscreen(Client *c, int fullscreen); static void setfullscreen(Client *c, int fullscreen);
static void setlayout(const Arg *arg); static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg); static void setmfact(const Arg *arg);
static void setup(void); static void setup(int argc, char *argv[]);
static void seturgent(Client *c, int urg); static void seturgent(Client *c, int urg);
static void showhide(Client *c); static void showhide(Client *c);
static void sigchld(int unused); static void sigchld(int unused);
@ -1527,7 +1527,7 @@ setmfact(const Arg *arg)
} }
void void
setup(void) setup(int argc, char *argv[])
{ {
int i; int i;
XSetWindowAttributes wa; XSetWindowAttributes wa;
@ -1570,6 +1570,13 @@ setup(void)
scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
for (i = 0; i < LENGTH(colors); i++) for (i = 0; i < LENGTH(colors); i++)
scheme[i] = drw_scm_create(drw, colors[i], 3); scheme[i] = drw_scm_create(drw, colors[i], 3);
if (argc > 0) {
Clr *cuscol = ecalloc(1, sizeof(Clr));
drw_clr_create(drw, cuscol, argv[1]);
scheme[SchemeSel][ColBg] = cuscol[0];
scheme[SchemeSel][ColBorder] = cuscol[0];
}
/* init bars */ /* init bars */
updatebars(); updatebars();
updatestatus(); updatestatus();
@ -2133,14 +2140,14 @@ main(int argc, char *argv[])
{ {
if (argc == 2 && !strcmp("-v", argv[1])) if (argc == 2 && !strcmp("-v", argv[1]))
die("dwm-"VERSION); die("dwm-"VERSION);
else if (argc != 1) //else if (argc != 1)
die("usage: dwm [-v]"); //die("usage: dwm [-v]");
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
fputs("warning: no locale support\n", stderr); fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL))) if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display"); die("dwm: cannot open display");
checkotherwm(); checkotherwm();
setup(); setup(argc, argv);
#ifdef __OpenBSD__ #ifdef __OpenBSD__
if (pledge("stdio rpath proc exec", NULL) == -1) if (pledge("stdio rpath proc exec", NULL) == -1)
die("pledge"); die("pledge");