mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
88 lines
3.1 KiB
C
88 lines
3.1 KiB
C
|
void
|
||
|
loadxrdb()
|
||
|
{
|
||
|
Display *display;
|
||
|
char * resm;
|
||
|
XrmDatabase xrdb;
|
||
|
char *type;
|
||
|
XrmValue value;
|
||
|
|
||
|
display = XOpenDisplay(NULL);
|
||
|
|
||
|
if (display != NULL) {
|
||
|
resm = XResourceManagerString(display);
|
||
|
|
||
|
if (resm != NULL) {
|
||
|
xrdb = XrmGetStringDatabase(resm);
|
||
|
|
||
|
if (xrdb != NULL) {
|
||
|
XRDB_LOAD_COLOR("dwm.normfgcolor", normfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.normbgcolor", normbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.normbordercolor", normbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.normfloatcolor", normfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.selfgcolor", selfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.selbgcolor", selbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.selbordercolor", selbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.selfloatcolor", selfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titlenormfgcolor", titlenormfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titlenormbgcolor", titlenormbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titlenormbordercolor", titlenormbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titlenormfloatcolor", titlenormfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titleselfgcolor", titleselfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titleselbgcolor", titleselbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titleselbordercolor", titleselbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.titleselfloatcolor", titleselfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsnormfgcolor", tagsnormfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsnormbgcolor", tagsnormbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsnormbordercolor", tagsnormbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsnormfloatcolor", tagsnormfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsselfgcolor", tagsselfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsselbgcolor", tagsselbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsselbordercolor", tagsselbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.tagsselfloatcolor", tagsselfloatcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.hidnormfgcolor", hidnormfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.hidnormbgcolor", hidnormbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.hidselfgcolor", hidselfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.hidselbgcolor", hidselbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.urgfgcolor", urgfgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.urgbgcolor", urgbgcolor);
|
||
|
XRDB_LOAD_COLOR("dwm.urgbordercolor", urgbordercolor);
|
||
|
XRDB_LOAD_COLOR("dwm.urgfloatcolor", urgfloatcolor);
|
||
|
XRDB_LOAD_COLOR("color0", termcol0);
|
||
|
XRDB_LOAD_COLOR("color1", termcol1);
|
||
|
XRDB_LOAD_COLOR("color2", termcol2);
|
||
|
XRDB_LOAD_COLOR("color3", termcol3);
|
||
|
XRDB_LOAD_COLOR("color4", termcol4);
|
||
|
XRDB_LOAD_COLOR("color5", termcol5);
|
||
|
XRDB_LOAD_COLOR("color6", termcol6);
|
||
|
XRDB_LOAD_COLOR("color7", termcol7);
|
||
|
XRDB_LOAD_COLOR("color8", termcol8);
|
||
|
XRDB_LOAD_COLOR("color9", termcol9);
|
||
|
XRDB_LOAD_COLOR("color10", termcol10);
|
||
|
XRDB_LOAD_COLOR("color11", termcol11);
|
||
|
XRDB_LOAD_COLOR("color12", termcol12);
|
||
|
XRDB_LOAD_COLOR("color13", termcol13);
|
||
|
XRDB_LOAD_COLOR("color14", termcol14);
|
||
|
XRDB_LOAD_COLOR("color15", termcol15);
|
||
|
|
||
|
XrmDestroyDatabase(xrdb);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
XCloseDisplay(display);
|
||
|
}
|
||
|
|
||
|
void
|
||
|
xrdb(const Arg *arg)
|
||
|
{
|
||
|
loadxrdb();
|
||
|
int i;
|
||
|
for (i = 0; i < LENGTH(colors); i++)
|
||
|
scheme[i] = drw_scm_create(drw, colors[i],
|
||
|
ColCount
|
||
|
);
|
||
|
arrange(NULL);
|
||
|
focus(NULL);
|
||
|
}
|