slock

Mahdi's build of slock
git clone git://mahdi.pw/slock.git
Log | Files | Refs | README | LICENSE

config.h (2267B)


      1 /* user and group to drop privileges to */
      2 static const char *user  = "nobody";
      3 static const char *group = "nobody";
      4 
      5 static const char *colorname[NUMCOLS] = {
      6 	[INIT] =   "black",     /* after initialization */
      7 	[INPUT] =  "#005577",   /* during input */
      8 	[FAILED] = "#CC3333",   /* wrong password */
      9 };
     10 
     11 /*
     12  * Xresources preferences to load at startup
     13  */
     14 ResourcePref resources[] = {
     15         { "color0",       STRING,  &colorname[INIT] },
     16         { "color4",       STRING,  &colorname[INPUT] },
     17         { "color1",       STRING,  &colorname[FAILED] },
     18 };
     19 
     20 /* treat a cleared input like a wrong password (color) */
     21 static const int failonclear = 1;
     22 
     23 /* number of failed password attempts until failcommand is executed.
     24    Set to 0 to disable */
     25 static const int failcount = 3;
     26 
     27 /* command to be executed after [failcount] failed password attempts */
     28 static const char *failcommand = "ffmpeg -y -loglevel quiet -f v4l2 -i /dev/video0 -frames:v 1 -f image2 /home/mahdy/slock-%Y-%m-%d-%H%M%S.jpg";
     29 
     30 /* time in seconds before the monitor shuts down */
     31 static const int monitortime = 60;
     32 
     33 /* insert grid pattern with scale 1:1, the size can be changed with logosize */
     34 static const int logosize = 60;
     35 static const int logow = 6;     /* grid width and height for right center alignment*/
     36 static const int logoh = 6;
     37 //static const int logow = 13;
     38 //static const int logoh = 6;
     39 
     40 static XRectangle rectangles[5] = {
     41 	/* x    y       w       h */
     42 	{ 0,    0,      1,      5 },
     43 	{ 1,    1,      1,      1 },
     44 	{ 2,    2,      1,      1 },
     45 	{ 3,    1,      1,      1 },
     46 	{ 4,    0,      1,      5 },
     47 };
     48 //static XRectangle rectangles[15] = {
     49 //	/* x    y       w       h */
     50 //	{ 0,    0,      1,      5 },
     51 //	{ 1,    1,      1,      1 },
     52 //	{ 2,    2,      1,      1 },
     53 //	{ 3,    1,      1,      1 },
     54 //	{ 4,    0,      1,      5 },
     55 //	{ 6,    1,      1,      1 },
     56 //	{ 6,    3,      1,      2 },
     57 //	{ 8,    0,      1,      5 },
     58 //	{ 9,    0,      1,      1 },
     59 //	{ 9,    2,      1,      1 },
     60 //	{ 10,   1,      1,      1 },
     61 //	{ 10,   3,      1,      1 },
     62 //	{ 11,   4,      1,      1 },
     63 //};
     64 
     65 /*Enable blur*/
     66 #define BLUR
     67 /*Set blur radius*/
     68 static const int blurRadius=20;
     69 /*Enable Pixelation*/
     70 //#define PIXELATION
     71 /*Set pixelation radius*/
     72 static const int pixelSize=30;