diff options
author | Nathan Reiner <nathan@nathanreiner.xyz> | 2022-09-16 17:39:17 +0200 |
---|---|---|
committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2022-09-16 17:39:17 +0200 |
commit | c41736d0dcda90513c57253fd8b2abbbbeb164a3 (patch) | |
tree | edd5f1f86f7f5da57693d669ab00b066229a9583 | |
parent | 07617d3e3239dcc1f7c75c0eae5af9645a57d1da (diff) |
-rw-r--r-- | config.h | 20 | ||||
-rwxr-xr-x | pinentry-dmenu | bin | 0 -> 57024 bytes | |||
-rw-r--r-- | pinentry-dmenu.c | 10 |
3 files changed, 18 insertions, 12 deletions
@@ -1,21 +1,23 @@ /* See LICENSE file for copyright and license details. */ /* Default settings; can be overriden by command line. */ -static int bottom = 0; +static int bottom = 1; static int embedded = 0; static int minpwlen = 32; static int mon = -1; -static int lineheight = 0; -static int min_lineheight = 8; +static int lineheight = 20; +static int min_lineheight = 20; +static int padding = 10; +static int border_width = 2; -static const char *asterisk = "*"; +static const char *asterisk = "•"; static const char *fonts[] = { - "monospace:size=10" + "SauceCodePro Nerd Font:style=Regular:pixelsize=14" }; static const char *prompt = NULL; static const char *colors[SchemeLast][4] = { - [SchemePrompt] = { "#bbbbbb", "#222222" }, - [SchemeNormal] = { "#bbbbbb", "#222222" }, - [SchemeSelect] = { "#eeeeee", "#005577" }, - [SchemeDesc] = { "#bbbbbb", "#222222" } + [SchemePrompt] = { "#ffffff", "#d85d5d" }, + [SchemeNormal] = { "#888888", "#191919" }, + [SchemeSelect] = { "#ffffff", "#547f62" }, + [SchemeDesc] = { "#ffffff", "#d85d5d" } }; diff --git a/pinentry-dmenu b/pinentry-dmenu Binary files differnew file mode 100755 index 0000000..b294893 --- /dev/null +++ b/pinentry-dmenu diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c index 3086b43..aa4adba 100644 --- a/pinentry-dmenu.c +++ b/pinentry-dmenu.c @@ -183,7 +183,7 @@ insert(const char *str, ssize_t n) { static void drawwin(void) { unsigned int curpos; - int x = 0, fh = drw->fonts->h, pb, pbw = 0, i; + int x = 0, fh = drw->fonts->h + 2 * padding, pb, pbw = 0, i; size_t asterlen = strlen(asterisk); size_t pdesclen; int leftinput; @@ -255,7 +255,7 @@ drawwin(void) { if ((curpos += lrpad / 2 - 1) < leftinput) { drw_setscheme(drw, scheme[SchemeNormal]); - drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0); + drw_rect(drw, x + curpos + 2, 2 + (bh - fh) / 2 + padding, 2, fh - 4 - 2 * padding, 1, 0); } free(censort); @@ -265,6 +265,10 @@ drawwin(void) { x = drawitem("Yes", (sel == Yes), x, 0, TEXTW("Yes")); } + drw_setscheme(drw, scheme[SchemePrompt]); + drw_rect(drw, 0, 0, mw, border_width, 1, 1); + drw_rect(drw, 0, bh - border_width, mw, bh, 1, 1); + drw_map(drw, win, 0, 0, mw, mh); } @@ -292,7 +296,7 @@ setup(void) { utf8 = XInternAtom(dpy, "UTF8_STRING", False); /* Calculate menu geometry */ - bh = drw->fonts->h + 2; + bh = drw->fonts->h + padding * 2; bh = MAX(bh, lineheight); mh = bh; #ifdef XINERAMA |