summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h8
-rw-r--r--drw.obin10624 -> 10616 bytes
-rw-r--r--explicit_bzero.obin1400 -> 1408 bytes
-rwxr-xr-xslockbin27416 -> 27496 bytes
-rw-r--r--slock.c10
-rw-r--r--slock.obin13528 -> 13856 bytes
-rw-r--r--util.obin2264 -> 2256 bytes
7 files changed, 13 insertions, 5 deletions
diff --git a/config.h b/config.h
index 400e4f2..c9d7ba3 100644
--- a/config.h
+++ b/config.h
@@ -3,15 +3,15 @@ static const char *user = "nobody";
static const char *group = "nogroup";
static const char *colorname[NUMCOLS] = {
- [INIT] = "#000000", /* after initialization */
- [INPUT] = "#000000", /* during input */
- [FAILED] = "#000000", /* wrong password */
+ [INIT] = "#181818", /* after initialization */
+ [INPUT] = "#181818", /* during input */
+ [FAILED] = "#181818", /* wrong password */
};
/* treat a cleared input like a wrong password (color) */
static const int failonclear = 1;
const char * fonts[] = {"Source Code Pro:size=24"};
-const char * schemes[] = {"#ffffff", "#000000", "#000000"};
+const char * schemes[] = {"#547f62", "#181818", "#181818"};
const int diasize[] = {320, 320};
const char * lock_message = "Nathan Reiner";
const char * pass_char = "•";
diff --git a/drw.o b/drw.o
index 941460b..b410ae3 100644
--- a/drw.o
+++ b/drw.o
Binary files differ
diff --git a/explicit_bzero.o b/explicit_bzero.o
index d98c7e9..5c022a6 100644
--- a/explicit_bzero.o
+++ b/explicit_bzero.o
Binary files differ
diff --git a/slock b/slock
index 1e6390b..db54289 100755
--- a/slock
+++ b/slock
Binary files differ
diff --git a/slock.c b/slock.c
index 0ec5b18..4a8ad63 100644
--- a/slock.c
+++ b/slock.c
@@ -152,8 +152,10 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
int t_pos[] = {(diasize[0] / 2) - (l_size / 2) + w_pos[0], w_pos[1]};
int t_len[] = {diasize[0] + w_pos[0], w_pos[1] / 3};
+ drw_rect(drw, 0, 0, crtc_info->width, crtc_info->height, 1, 1);
drw_text(drw, t_pos[0], t_pos[1], t_len[0], t_len[1], 0, lock_message, 0);
drw_map(drw, locks[0]->win, 0, 0, crtc_info->width, crtc_info->height);
+
while (running && !XNextEvent(dpy, &ev)) {
@@ -214,7 +216,8 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
oldc = color;
}
- drw_rect(drw, 0, crtc_info->height - w_pos[1], crtc_info->width, w_len[1], 1, 1);
+ drw_rect(drw, 0, 0, crtc_info->width, crtc_info->height, 1, 1);
+ drw_text(drw, t_pos[0], t_pos[1], t_len[0], t_len[1], 0, lock_message, 0);
if (!failure) {
@@ -235,6 +238,11 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
failure = 0;
}
+ if (strlen(passwd) > 0)
+ drw_rect(drw, crtc_info->width / 2 - strlen(passwd) * 15 / 2 - 15, w_pos[1] + diasize[1] + 140, strlen(passwd) * 15 + 33, 47, 0, 0);
+ else
+ drw_rect(drw, crtc_info->width / 2 - 15 / 2 - 15, w_pos[1] + diasize[1] + 140, 15 + 33, 47, 0, 0);
+
drw_map(drw, locks[0]->win, 0, 0, crtc_info->width, crtc_info->height);
} else if (rr->active && ev.type == rr->evbase + RRScreenChangeNotify) {
diff --git a/slock.o b/slock.o
index b25eddc..2946ec3 100644
--- a/slock.o
+++ b/slock.o
Binary files differ
diff --git a/util.o b/util.o
index 4607dbd..5dee2d7 100644
--- a/util.o
+++ b/util.o
Binary files differ