2016-09-07 13:32:29 +02:00
|
|
|
/* user and group to drop privileges to */
|
|
|
|
static const char *user = "nobody";
|
2020-08-03 17:25:50 +02:00
|
|
|
static const char *group = "nogroup"; // use "nobody" for arch
|
2016-09-07 13:32:29 +02:00
|
|
|
|
2015-02-11 23:56:35 +01:00
|
|
|
static const char *colorname[NUMCOLS] = {
|
2021-09-13 15:40:10 +02:00
|
|
|
#if DWM_LOGO_PATCH && !BLUR_PIXELATED_SCREEN_PATCH
|
2021-09-13 10:48:56 +02:00
|
|
|
[BACKGROUND] = "#2d2d2d", /* after initialization */
|
|
|
|
#endif // DWM_LOGO_PATCH
|
2016-11-20 00:29:41 +01:00
|
|
|
[INIT] = "black", /* after initialization */
|
|
|
|
[INPUT] = "#005577", /* during input */
|
|
|
|
[FAILED] = "#CC3333", /* wrong password */
|
2019-10-17 19:06:39 +02:00
|
|
|
#if CAPSCOLOR_PATCH
|
|
|
|
[CAPS] = "red", /* CapsLock on */
|
|
|
|
#endif // CAPSCOLOR_PATCH
|
|
|
|
#if PAMAUTH_PATCH
|
|
|
|
[PAM] = "#9400D3", /* waiting for PAM */
|
2019-11-27 08:42:00 +01:00
|
|
|
#endif // PAMAUTH_PATCH
|
2020-08-03 15:53:34 +02:00
|
|
|
#if KEYPRESS_FEEDBACK_PATCH
|
|
|
|
[BLOCKS] = "#ffffff", /* key feedback block */
|
|
|
|
#endif // KEYPRESS_FEEDBACK_PATCH
|
2019-11-27 08:42:00 +01:00
|
|
|
};
|
|
|
|
|
2021-06-08 14:12:46 +02:00
|
|
|
#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
|
|
|
|
|
2022-03-28 14:22:21 +02:00
|
|
|
#if BACKGROUND_IMAGE_PATCH
|
|
|
|
/* Background image path, should be available to the user above */
|
|
|
|
static const char * background_image = "";
|
|
|
|
#endif // BACKGROUND_IMAGE_PATCH
|
|
|
|
|
2021-09-13 10:48:56 +02:00
|
|
|
#if DWM_LOGO_PATCH
|
|
|
|
/* insert grid pattern with scale 1:1, the size can be changed with logosize */
|
|
|
|
static const int logosize = 75;
|
|
|
|
static const int logow = 12; /* grid width and height for right center alignment*/
|
|
|
|
static const int logoh = 6;
|
|
|
|
|
|
|
|
static XRectangle rectangles[] = {
|
|
|
|
/* x y w h */
|
|
|
|
{ 0, 3, 1, 3 },
|
|
|
|
{ 1, 3, 2, 1 },
|
|
|
|
{ 0, 5, 8, 1 },
|
|
|
|
{ 3, 0, 1, 5 },
|
|
|
|
{ 5, 3, 1, 2 },
|
|
|
|
{ 7, 3, 1, 2 },
|
|
|
|
{ 8, 3, 4, 1 },
|
|
|
|
{ 9, 4, 1, 2 },
|
|
|
|
{ 11, 4, 1, 2 },
|
|
|
|
};
|
|
|
|
#endif // DWM_LOGO_PATCH
|
|
|
|
|
2019-11-27 08:42:00 +01:00
|
|
|
#if XRESOURCES_PATCH
|
|
|
|
/*
|
|
|
|
* Xresources preferences to load at startup
|
|
|
|
*/
|
|
|
|
ResourcePref resources[] = {
|
2021-09-13 15:40:10 +02:00
|
|
|
#if DWM_LOGO_PATCH && !BLUR_PIXELATED_SCREEN_PATCH
|
2022-03-28 14:22:21 +02:00
|
|
|
{ "background", STRING, &colorname[BACKGROUND] },
|
2021-09-13 10:48:56 +02:00
|
|
|
#endif //DWM_LOGO_PATCH
|
2022-03-28 14:22:21 +02:00
|
|
|
#if BACKGROUND_IMAGE_PATCH
|
|
|
|
{ "bg_image", STRING, &background_image },
|
|
|
|
#endif // BACKGROUND_IMAGE_PATCH
|
|
|
|
{ "locked", STRING, &colorname[INIT] },
|
|
|
|
{ "input", STRING, &colorname[INPUT] },
|
|
|
|
{ "failed", STRING, &colorname[FAILED] },
|
2019-11-27 08:42:00 +01:00
|
|
|
#if CAPSCOLOR_PATCH
|
2022-03-28 14:22:21 +02:00
|
|
|
{ "capslock", STRING, &colorname[CAPS] },
|
2019-11-27 08:42:00 +01:00
|
|
|
#endif // CAPSCOLOR_PATCH
|
|
|
|
#if PAMAUTH_PATCH
|
2022-03-28 14:22:21 +02:00
|
|
|
{ "pamauth", STRING, &colorname[PAM] },
|
2019-11-27 08:42:00 +01:00
|
|
|
#endif // PAMAUTH_PATCH
|
2021-06-08 14:12:46 +02:00
|
|
|
#if MESSAGE_PATCH || COLOR_MESSAGE_PATCH
|
2022-03-28 14:22:21 +02:00
|
|
|
{ "message", STRING, &message },
|
|
|
|
{ "text_color", STRING, &text_color },
|
|
|
|
{ "font_name", STRING, &font_name },
|
2021-06-08 14:12:46 +02:00
|
|
|
#endif // MESSAGE_PATCH | COLOR_MESSAGE_PATCH
|
2015-02-11 23:56:35 +01:00
|
|
|
};
|
2019-11-27 08:42:00 +01:00
|
|
|
#endif // XRESOURCES_PATCH
|
2016-02-14 01:32:02 +01:00
|
|
|
|
2020-08-03 17:25:50 +02:00
|
|
|
#if ALPHA_PATCH
|
|
|
|
/* lock screen opacity */
|
|
|
|
static const float alpha = 0.9;
|
|
|
|
#endif // ALPHA_PATCH
|
|
|
|
|
2016-11-20 00:29:41 +01:00
|
|
|
/* treat a cleared input like a wrong password (color) */
|
2016-02-14 01:32:02 +01:00
|
|
|
static const int failonclear = 1;
|
2019-10-17 19:06:39 +02:00
|
|
|
|
2021-09-09 11:54:37 +02:00
|
|
|
#if AUTO_TIMEOUT_PATCH
|
|
|
|
/* length of time (seconds) until */
|
|
|
|
static const int timeoffset = 60;
|
|
|
|
|
|
|
|
/* should [command] be run only once? */
|
|
|
|
static const int runonce = 0;
|
|
|
|
|
|
|
|
/* command to be run after [time] has passed */
|
|
|
|
static const char *command = "doas poweroff";
|
|
|
|
#endif // AUTO_TIMEOUT_PATCH
|
|
|
|
|
2021-09-09 10:17:00 +02:00
|
|
|
#if FAILURE_COMMAND_PATCH
|
|
|
|
/* number of failed password attempts until failcommand is executed.
|
|
|
|
Set to 0 to disable */
|
|
|
|
static const int failcount = 0;
|
|
|
|
|
|
|
|
/* command to be executed after [failcount] failed password attempts */
|
|
|
|
static const char *failcommand = "shutdown";
|
|
|
|
#endif // FAILURE_COMMAND_PATCH
|
|
|
|
|
2021-09-09 11:07:56 +02:00
|
|
|
#if SECRET_PASSWORD_PATCH
|
|
|
|
static const secretpass scom[] = {
|
|
|
|
/* Password command */
|
|
|
|
{ "shutdown", "doas poweroff"},
|
|
|
|
};
|
|
|
|
#endif // SECRET_PASSWORD_PATCH
|
|
|
|
|
2020-08-03 16:56:33 +02:00
|
|
|
#if BLUR_PIXELATED_SCREEN_PATCH
|
|
|
|
/* Enable blur */
|
|
|
|
#define BLUR
|
|
|
|
/* Set blur radius */
|
2021-09-13 10:48:56 +02:00
|
|
|
static const int blurRadius = 5;
|
2020-08-03 16:56:33 +02:00
|
|
|
/* Enable Pixelation */
|
|
|
|
//#define PIXELATION
|
|
|
|
/* Set pixelation radius */
|
2021-09-13 10:48:56 +02:00
|
|
|
static const int pixelSize = 10;
|
2020-08-03 16:56:33 +02:00
|
|
|
#endif // BLUR_PIXELATED_SCREEN_PATCH
|
|
|
|
|
2019-10-17 19:06:39 +02:00
|
|
|
#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
|
|
|
|
|
2020-08-03 15:53:34 +02:00
|
|
|
#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
|
|
|
|
|
2019-10-17 19:06:39 +02:00
|
|
|
#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
|