commit 538246f08957d45cda3d5547c4475662ef1d077f
parent 953f0ae0ad8688cc629126229ad36c65c5965c91
Author: Milutin Popovic <milutin@popovic.xyz>
Date: Tue, 10 Mar 2026 21:56:07 +0000
fix syntax
Diffstat:
| A | config.h | | | 88 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 88 insertions(+), 0 deletions(-)
diff --git a/config.h b/config.h
@@ -0,0 +1,88 @@
+/* user and group to drop privileges to */
+static const char *user = "user"; // <- change this to use slock
+static const char *group = "group"; // <- change this to use slock
+
+static const char *colorname[NUMCOLS] = {
+ [BACKGROUND] = "black", /* after initialization */
+ [INIT] = "#A16C1F", /* after initialization */
+ [INPUT] = "#A96C8A", /* during input */
+ [FAILED] = "#2d2d2d", /* wrong password */
+ [CAPS] = "#6CA98A", /* CapsLock on */
+};
+
+/* treat a cleared input like a wrong password (color) */
+static int failonclear = 0;
+
+static int logosize = 50;
+static int logow = 9; /* Grid width and height for right center alignment*/
+static int logoh = 6;
+
+/* Setup specific draw on two monitors should be 0 false or 1 true */
+static int draw_on_two= 1;
+
+static XRectangle rectangles_double[18] = {
+ /* x y w h */
+ { 0, 4, 1, 2 },
+ { 1, 2, 1, 2 },
+ { 2, 0, 1, 2 },
+ { 4, 0, 1, 6 },
+ { 4, 0, 3, 1 },
+ { 4, 5, 3, 1 },
+ { 6, 0, 1, 6 },
+ //
+ { -40, 4, 1, 2 },
+ { -39, 2, 1, 2 },
+ { -38, 0, 1, 2 },
+ { -36, 0, 1, 6 },
+ { -36, 0, 3, 1 },
+ { -36, 5, 3, 1 },
+ { -34, 0, 1, 6 },
+};
+
+static XRectangle rectangles[18] = {
+ /* x y w h */
+ { 0, 4, 1, 2 },
+ { 1, 2, 1, 2 },
+ { 2, 0, 1, 2 },
+ { 4, 0, 1, 6 },
+ { 4, 0, 3, 1 },
+ { 4, 5, 3, 1 },
+ { 6, 0, 1, 6 },
+ { 0, 4, 1, 2 },
+ { 1, 2, 1, 2 },
+ { 2, 0, 1, 2 },
+ { 4, 0, 1, 6 },
+ { 4, 0, 3, 1 },
+ { 4, 5, 3, 1 },
+ { 6, 0, 1, 6 },
+};
+
+/*Enable blur*/
+#define BLUR
+/*Set blur radius*/
+static int blurRadius=10;
+/*Enable Pixelation*/
+#define PIXELATION
+/*Set pixelation radius*/
+static int pixelSize=10;
+
+/*
+ * Xresources preferences to load at startup
+ */
+ResourcePref resources[] = {
+ { "user", STRING, &user},
+ { "group", STRING, &group},
+ { "color_background", STRING, &colorname[BACKGROUND] },
+ { "color_init", STRING, &colorname[INIT] },
+ { "color_input", STRING, &colorname[INPUT] },
+ { "color_failed", STRING, &colorname[FAILED] },
+ { "color_caps", STRING, &colorname[CAPS] },
+ { "failonclear", INTEGER, &failonclear },
+ { "logosize", INTEGER, &logosize },
+ { "logow", INTEGER, &logow },
+ { "logoh", INTEGER, &logoh },
+ { "draw_on_two", INTEGER, &draw_on_two },
+ { "blurRadius", INTEGER, &blurRadius },
+ { "pixelSize", INTEGER, &pixelSize },
+};
+