small patches

This commit is contained in:
Luca Bilke 2023-05-31 00:48:34 +02:00
commit c844a7936a
4 changed files with 5 additions and 12 deletions

View file

@ -25,7 +25,7 @@ Config
------ ------
To use pinentry-dmenu add in `~/.gnupg/gpg-agent.conf`: To use pinentry-dmenu add in `~/.gnupg/gpg-agent.conf`:
pinentry-program <absolut path to pinentry-dmenu> pinentry-program <absolute path to pinentry-dmenu>
The config is located in `~/.gnupg/pinentry-dmenu.conf`. The config is located in `~/.gnupg/pinentry-dmenu.conf`.

View file

@ -7,8 +7,8 @@ BUGREPORT = https:\/\/github.com\/ritze\/pinentry-dmenu
PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/include/X11 X11INC = /usr/X11R6/include
X11LIB = /usr/lib/X11 X11LIB = /usr/X11R6/lib
# Xinerama, comment if you don't want it # Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama XINERAMALIBS = -lXinerama

View file

@ -37,9 +37,6 @@ pinentry-dmenu appears at the bottom of the screen.
.BI "min_password_length =" " 32" .BI "min_password_length =" " 32"
The minimal space of the password field. This value has affect to the description field after the password field. The minimal space of the password field. This value has affect to the description field after the password field.
.TP .TP
.BI "height =" " 8"
Height of pinentry-dmenu in pixels (no less than 8)
.TP
.BI "monitor =" " -1" .BI "monitor =" " -1"
pinentry-dmenu is displayed on the monitor number supplied. Monitor numbers are starting from 0. pinentry-dmenu is displayed on the monitor number supplied. Monitor numbers are starting from 0.
.TP .TP

View file

@ -183,7 +183,7 @@ insert(const char *str, ssize_t n) {
static void static void
drawwin(void) { drawwin(void) {
unsigned int curpos; unsigned int curpos;
int x = 0, fh = drw->fonts->h, pb, pbw = 0, i; int x = 0, pb, pbw = 0, i;
size_t asterlen = strlen(asterisk); size_t asterlen = strlen(asterisk);
size_t pdesclen; size_t pdesclen;
int leftinput; int leftinput;
@ -255,7 +255,7 @@ drawwin(void) {
if ((curpos += lrpad / 2 - 1) < leftinput) { if ((curpos += lrpad / 2 - 1) < leftinput) {
drw_setscheme(drw, scheme[SchemeNormal]); 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 - 4, 1, 0);
} }
free(censort); free(censort);
@ -293,7 +293,6 @@ setup(void) {
/* Calculate menu geometry */ /* Calculate menu geometry */
bh = drw->fonts->h + 2; bh = drw->fonts->h + 2;
bh = MAX(bh, lineheight);
mh = bh; mh = bh;
#ifdef XINERAMA #ifdef XINERAMA
info = XineramaQueryScreens(dpy, &n); info = XineramaQueryScreens(dpy, &n);
@ -745,9 +744,6 @@ main(int argc, char *argv[]) {
if (config_lookup_int(&cfg, "min_password_length", &val)) { if (config_lookup_int(&cfg, "min_password_length", &val)) {
minpwlen = val; minpwlen = val;
} }
if (config_lookup_int(&cfg, "height", &val)) {
lineheight = MAX(val, min_lineheight);
}
if (config_lookup_int(&cfg, "monitor", &val)) { if (config_lookup_int(&cfg, "monitor", &val)) {
mon = val; mon = val;
} }