feat: use XResources to define colors
This commit is contained in:
parent
e64ab65227
commit
0f4c5faed3
10
dmenu.c
10
dmenu.c
@ -714,23 +714,23 @@ readxresources(void) {
|
||||
XrmDatabase xdb = XrmGetStringDatabase(xrm);
|
||||
XrmValue xval;
|
||||
|
||||
if (XrmGetResource(xdb, "*.font", "*", &type, &xval))
|
||||
if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval))
|
||||
fonts[0] = strdup(xval.addr);
|
||||
else
|
||||
fonts[0] = strdup(fonts[0]);
|
||||
if (XrmGetResource(xdb, "*.background", "*", &type, &xval))
|
||||
if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval))
|
||||
colors[SchemeNorm][ColBg] = strdup(xval.addr);
|
||||
else
|
||||
colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]);
|
||||
if (XrmGetResource(xdb, "*.normforeground", "*", &type, &xval))
|
||||
if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval))
|
||||
colors[SchemeNorm][ColFg] = strdup(xval.addr);
|
||||
else
|
||||
colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]);
|
||||
if (XrmGetResource(xdb, "*.color10", "*", &type, &xval))
|
||||
if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval))
|
||||
colors[SchemeSel][ColBg] = strdup(xval.addr);
|
||||
else
|
||||
colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]);
|
||||
if (XrmGetResource(xdb, "*.color0", "*", &type, &xval))
|
||||
if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval))
|
||||
colors[SchemeSel][ColFg] = strdup(xval.addr);
|
||||
else
|
||||
colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user