From bfbca90991c227c4db99018edbb0325557e931d0 Mon Sep 17 00:00:00 2001 From: NPScript Date: Mon, 22 Feb 2021 12:46:29 +0100 Subject: changed theme --- config.h | 8 ++++---- drw.o | Bin 10624 -> 10616 bytes explicit_bzero.o | Bin 1400 -> 1408 bytes slock | Bin 27416 -> 27496 bytes slock.c | 10 +++++++++- slock.o | Bin 13528 -> 13856 bytes util.o | Bin 2264 -> 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 Binary files a/drw.o and b/drw.o differ diff --git a/explicit_bzero.o b/explicit_bzero.o index d98c7e9..5c022a6 100644 Binary files a/explicit_bzero.o and b/explicit_bzero.o differ diff --git a/slock b/slock index 1e6390b..db54289 100755 Binary files a/slock and b/slock 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 Binary files a/slock.o and b/slock.o differ diff --git a/util.o b/util.o index 4607dbd..5dee2d7 100644 Binary files a/util.o and b/util.o differ -- cgit v1.2.3-70-g09d2