mirror of
https://github.com/mintycube/slock.git
synced 2024-10-22 14:05:51 +02:00
message patch: add xresources compatibility ref. #3
This commit is contained in:
parent
d2be9eb632
commit
d7b259be34
25
config.def.h
25
config.def.h
@ -17,6 +17,17 @@ static const char *colorname[NUMCOLS] = {
|
||||
#endif // KEYPRESS_FEEDBACK_PATCH
|
||||
};
|
||||
|
||||
#if MESSAGE_PATCH || COLOR_MESSAGE_PATCH
|
||||
/* default message */
|
||||
static const char * message = "Suckless: Software that sucks less.";
|
||||
|
||||
/* text color */
|
||||
static const char * text_color = "#ffffff";
|
||||
|
||||
/* text size (must be a valid size) */
|
||||
static const char * font_name = "6x10";
|
||||
#endif // MESSAGE_PATCH | COLOR_MESSAGE_PATCH
|
||||
|
||||
#if XRESOURCES_PATCH
|
||||
/*
|
||||
* Xresources preferences to load at startup
|
||||
@ -31,6 +42,9 @@ ResourcePref resources[] = {
|
||||
#if PAMAUTH_PATCH
|
||||
{ "color5", STRING, &colorname[PAM] },
|
||||
#endif // PAMAUTH_PATCH
|
||||
#if MESSAGE_PATCH || COLOR_MESSAGE_PATCH
|
||||
{ "color6", STRING, &text_color },
|
||||
#endif // MESSAGE_PATCH | COLOR_MESSAGE_PATCH
|
||||
};
|
||||
#endif // XRESOURCES_PATCH
|
||||
|
||||
@ -76,17 +90,6 @@ static const int blocks_y = 0;
|
||||
static const int blocks_count = 10;
|
||||
#endif // KEYPRESS_FEEDBACK_PATCH
|
||||
|
||||
#if MESSAGE_PATCH || COLOR_MESSAGE_PATCH
|
||||
/* default message */
|
||||
static const char * message = "Suckless: Software that sucks less.";
|
||||
|
||||
/* text color */
|
||||
static const char * text_color = "#ffffff";
|
||||
|
||||
/* text size (must be a valid size) */
|
||||
static const char * font_name = "6x10";
|
||||
#endif // MESSAGE_PATCH | COLOR_MESSAGE_PATCH
|
||||
|
||||
#if PAMAUTH_PATCH
|
||||
/* PAM service that's used for authentication */
|
||||
static const char* pam_service = "login";
|
||||
|
@ -38,7 +38,7 @@ writemessage(Display *dpy, Window win, int screen)
|
||||
tab_size = 8 * XTextWidth(fontinfo, " ", 1);
|
||||
|
||||
XAllocNamedColor(dpy, DefaultColormap(dpy, screen),
|
||||
text_color, &color, &dummy);
|
||||
text_color, &color, &dummy);
|
||||
|
||||
gr_values.font = fontinfo->fid;
|
||||
gr_values.foreground = color.pixel;
|
||||
|
Loading…
Reference in New Issue
Block a user