mirror of
https://github.com/mintycube/slock.git
synced 2024-10-18 14:05:54 +02:00
82 lines
2.3 KiB
C
82 lines
2.3 KiB
C
/* user and group to drop privileges to */
|
|
static const char *user = "nobody";
|
|
static const char *group = "nogroup";
|
|
|
|
static const char *colorname[NUMCOLS] = {
|
|
[INIT] = "black", /* after initialization */
|
|
[INPUT] = "#005577", /* during input */
|
|
[FAILED] = "#CC3333", /* wrong password */
|
|
#if CAPSCOLOR_PATCH
|
|
[CAPS] = "red", /* CapsLock on */
|
|
#endif // CAPSCOLOR_PATCH
|
|
#if PAMAUTH_PATCH
|
|
[PAM] = "#9400D3", /* waiting for PAM */
|
|
#endif // PAMAUTH_PATCH
|
|
#if KEYPRESS_FEEDBACK_PATCH
|
|
[BLOCKS] = "#ffffff", /* key feedback block */
|
|
#endif // KEYPRESS_FEEDBACK_PATCH
|
|
};
|
|
|
|
#if XRESOURCES_PATCH
|
|
/*
|
|
* Xresources preferences to load at startup
|
|
*/
|
|
ResourcePref resources[] = {
|
|
{ "color0", STRING, &colorname[INIT] },
|
|
{ "color4", STRING, &colorname[INPUT] },
|
|
{ "color1", STRING, &colorname[FAILED] },
|
|
#if CAPSCOLOR_PATCH
|
|
{ "color3", STRING, &colorname[CAPS] },
|
|
#endif // CAPSCOLOR_PATCH
|
|
#if PAMAUTH_PATCH
|
|
{ "color5", STRING, &colorname[PAM] },
|
|
#endif // PAMAUTH_PATCH
|
|
};
|
|
#endif // XRESOURCES_PATCH
|
|
|
|
/* treat a cleared input like a wrong password (color) */
|
|
static const int failonclear = 1;
|
|
|
|
#if CONTROLCLEAR_PATCH
|
|
/* allow control key to trigger fail on clear */
|
|
static const int controlkeyclear = 0;
|
|
#endif // CONTROLCLEAR_PATCH
|
|
|
|
#if DPMS_PATCH
|
|
/* time in seconds before the monitor shuts down */
|
|
static const int monitortime = 5;
|
|
#endif // DPMS_PATCH
|
|
|
|
#if KEYPRESS_FEEDBACK_PATCH
|
|
static short int blocks_enabled = 1; // 0 = don't show blocks
|
|
static const int blocks_width = 0; // 0 = full width
|
|
static const int blocks_height = 16;
|
|
|
|
// position
|
|
static const int blocks_x = 0;
|
|
static const int blocks_y = 0;
|
|
|
|
// Number of blocks
|
|
static const int blocks_count = 10;
|
|
#endif // KEYPRESS_FEEDBACK_PATCH
|
|
|
|
#if 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
|
|
|
|
#if PAMAUTH_PATCH
|
|
/* PAM service that's used for authentication */
|
|
static const char* pam_service = "login";
|
|
#endif // PAMAUTH_PATCH
|
|
|
|
#if QUICKCANCEL_PATCH
|
|
/* time in seconds to cancel lock with mouse movement */
|
|
static const int timetocancel = 4;
|
|
#endif // QUICKCANCEL_PATCH
|