Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
13dc985fe6 |
4 changed files with 7 additions and 17 deletions
2
config.h
2
config.h
|
@ -5,8 +5,6 @@ static int bottom = 0;
|
||||||
static int embedded = 0;
|
static int embedded = 0;
|
||||||
static int minpwlen = 32;
|
static int minpwlen = 32;
|
||||||
static int mon = -1;
|
static int mon = -1;
|
||||||
static int lineheight = 0;
|
|
||||||
static int min_lineheight = 8;
|
|
||||||
|
|
||||||
static const char *asterisk = "*";
|
static const char *asterisk = "*";
|
||||||
static const char *fonts[] = {
|
static const char *fonts[] = {
|
||||||
|
|
|
@ -16,16 +16,13 @@ XINERAMAFLAGS = -DXINERAMA
|
||||||
|
|
||||||
# Freetype
|
# Freetype
|
||||||
FREETYPELIBS = -lfontconfig -lXft
|
FREETYPELIBS = -lfontconfig -lXft
|
||||||
#FREETYPEINC = /usr/include/freetype2
|
FREETYPEINC = /usr/include/freetype2
|
||||||
# OpenBSD (uncomment)
|
# OpenBSD (uncomment)
|
||||||
#FREETYPEINC = ${X11INC}/freetype2
|
#FREETYPEINC = ${X11INC}/freetype2
|
||||||
# FreeBSD
|
|
||||||
FREETYPEINC = /usr/local/include/freetype2
|
|
||||||
|
|
||||||
# Includes and libs
|
# Includes and libs
|
||||||
# FreeBSD has this within /usr/local/{include,lib}
|
INCS = -I${X11INC} -I${FREETYPEINC}
|
||||||
INCS = -I/usr/local/include -I${X11INC} -I${FREETYPEINC}
|
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
||||||
LIBS = -L/usr/local/lib -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -DPACKAGE_VERSION=\"${VERSION}\" -DPACKAGE_BUGREPORT=\"${BUGREPORT}\"
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -DPACKAGE_VERSION=\"${VERSION}\" -DPACKAGE_BUGREPORT=\"${BUGREPORT}\"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -788,6 +784,8 @@ main(int argc, char *argv[]) {
|
||||||
fprintf(stderr, "%s:%d: %s\n", config_error_file(&cfg),
|
fprintf(stderr, "%s:%d: %s\n", config_error_file(&cfg),
|
||||||
config_error_line(&cfg), config_error_text(&cfg));
|
config_error_line(&cfg), config_error_text(&cfg));
|
||||||
return(EXIT_FAILURE);
|
return(EXIT_FAILURE);
|
||||||
|
} else {
|
||||||
|
printf("No config file found. Use defaults.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
pinentry_init("pinentry-dmenu");
|
pinentry_init("pinentry-dmenu");
|
||||||
|
|
Loading…
Reference in a new issue