Added defines for BLUR/PIXELATION to remove from code by compilation - slock - 🔒 glitch version of slock
(HTM) git clone https://git.drkhsh.at/slock.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 0316f4843820db1875436ac23582c508ea92b13c
(DIR) parent 8056b5db1f14fd95d5abcace8f42899740774289
(HTM) Author: Lars Niesen <iah71niesen@gso-koeln.de>
Date: Mon, 4 May 2020 10:00:40 +0200
Added defines for BLUR/PIXELATION to remove from code by compilation
Diffstat:
M config.def.h | 11 ++++++++---
M slock.c | 9 ++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/config.def.h b/config.def.h
@@ -11,6 +11,11 @@ static const char *colorname[NUMCOLS] = {
/* treat a cleared input like a wrong password (color) */
static const int failonclear = 1;
-/*Set Blur radius*/
-static const int blurRadius=0;
-static const int pixelSize=5;
+/*Enable blur*/
+#define BLUR
+/*Set blur radius*/
+static const int blurRadius=5;
+/*Enable Pixelation*/
+//#define PIXELATION
+/*Set pixelation radius*/
+static const int pixelSize=0;
(DIR) diff --git a/slock.c b/slock.c
@@ -382,11 +382,14 @@ main(int argc, char **argv) {
imlib_context_set_visual(DefaultVisual(dpy,0));
imlib_context_set_drawable(RootWindow(dpy,XScreenNumberOfScreen(scr)));
imlib_copy_drawable_to_image(0,0,0,scr->width,scr->height,0,0,1);
-
+
+#ifdef BLUR
+
/*Blur function*/
imlib_image_blur(blurRadius);
+#endif // BLUR
-
+#ifdef PIXELATION
/*Pixelation*/
int width = scr->width;
int height = scr->height;
@@ -424,7 +427,7 @@ main(int argc, char **argv) {
}
-
+#endif
/* check for Xrandr support */
rr.active = XRRQueryExtension(dpy, &rr.evbase, &rr.errbase);