2019-09-15 22:45:22 +02:00
|
|
|
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);
|
2019-09-15 23:33:43 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.normfloatcolor", normfloatcolor);
|
2019-09-15 22:45:22 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.selfgcolor", selfgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selbgcolor", selbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selbordercolor", selbordercolor);
|
2019-09-15 23:33:43 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.selfloatcolor", selfloatcolor);
|
2020-08-21 15:49:15 +02:00
|
|
|
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);
|
2019-09-15 22:45:22 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.hidfgcolor", hidfgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.hidbgcolor", hidbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.hidbordercolor", hidbordercolor);
|
2019-09-15 23:33:43 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.hidfloatcolor", hidfloatcolor);
|
2020-08-21 15:49:15 +02:00
|
|
|
XRDB_LOAD_COLOR("dwm.urgfgcolor", urgfgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.urgbgcolor", urgbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.urgbordercolor", urgbordercolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.urgfloatcolor", urgfloatcolor);
|
|
|
|
#if BAR_FLEXWINTITLE_PATCH
|
|
|
|
XRDB_LOAD_COLOR("dwm.normTTBbgcolor", normTTBbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normLTRbgcolor", normLTRbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normMONObgcolor", normMONObgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normGRIDbgcolor", normGRIDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normGRD1bgcolor", normGRD1bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normGRD2bgcolor", normGRD2bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normGRDMbgcolor", normGRDMbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normHGRDbgcolor", normHGRDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normDWDLbgcolor", normDWDLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normSPRLbgcolor", normSPRLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.normfloatbgcolor", normfloatbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actTTBbgcolor", actTTBbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actLTRbgcolor", actLTRbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actMONObgcolor", actMONObgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actGRIDbgcolor", actGRIDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actGRD1bgcolor", actGRD1bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actGRD2bgcolor", actGRD2bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actGRDMbgcolor", actGRDMbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actHGRDbgcolor", actHGRDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actDWDLbgcolor", actDWDLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actSPRLbgcolor", actSPRLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.actfloatbgcolor", actfloatbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selTTBbgcolor", selTTBbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selLTRbgcolor", selLTRbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selMONObgcolor", selMONObgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selGRIDbgcolor", selGRIDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selGRD1bgcolor", selGRD1bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selGRD2bgcolor", selGRD2bgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selGRDMbgcolor", selGRDMbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selHGRDbgcolor", selHGRDbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selDWDLbgcolor", selDWDLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selSPRLbgcolor", selSPRLbgcolor);
|
|
|
|
XRDB_LOAD_COLOR("dwm.selfloatbgcolor", selfloatbgcolor);
|
|
|
|
#endif // BAR_FLEXWINTITLE_PATCH
|
2020-09-09 17:24:02 +02:00
|
|
|
#if BAR_STATUS2D_XRDB_TERMCOLORS_PATCH && BAR_STATUS2D_PATCH
|
2020-08-28 07:17:52 +02:00
|
|
|
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);
|
|
|
|
#endif // BAR_STATUS2D_XRDB_TERMCOLORS_PATCH
|
2019-09-15 22:45:22 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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],
|
2020-07-15 08:57:30 +02:00
|
|
|
#if BAR_ALPHA_PATCH
|
2019-09-15 22:45:22 +02:00
|
|
|
alphas[i],
|
2020-07-15 08:57:30 +02:00
|
|
|
#endif // BAR_ALPHA_PATCH
|
2020-08-21 15:49:15 +02:00
|
|
|
ColCount
|
2019-09-15 22:45:22 +02:00
|
|
|
);
|
|
|
|
focus(NULL);
|
|
|
|
arrange(NULL);
|
|
|
|
}
|