From 017b3859ee86e97a7faeb0c9c81512de4272fc06 Mon Sep 17 00:00:00 2001 From: Moritz Luedecke Date: Sun, 30 Jul 2017 13:08:45 +0200 Subject: Rename spine into pinentry-dmenu --- Makefile | 14 +++++++------- README | 3 ++- config.h | 10 +++++----- config.mk | 4 ++-- test | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 6d69863..dc70e54 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ -# spine - dmenu-like stupid pin entry +# pinentry-dmenu - dmenu-like stupid pin entry # See LICENSE file for copyright and license details. include config.mk -SRC = spine.c drw.c util.c +SRC = pinentry-dmenu.c drw.c util.c OBJ = ${SRC:.c=.o} -all: options spine +all: options pinentry-dmenu options: - @echo spine build options: + @echo pinentry-dmenu build options: @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" @@ -27,13 +27,13 @@ ${OBJ}: config.h config.mk drw.h pinentry: $(MAKE) -C pinentry -spine: pinentry spine.o drw.o util.o +pinentry-dmenu: pinentry pinentry-dmenu.o drw.o util.o @echo CC -o $@ - @${CC} -o $@ spine.o drw.o util.o pinentry/pinentry.o pinentry/util.o pinentry/password-cache.o pinentry/argparse.o pinentry/secmem.o ${LDFLAGS} -lassuan -lgpgme -lgpg-error + @${CC} -o $@ pinentry-dmenu.o drw.o util.o pinentry/pinentry.o pinentry/util.o pinentry/password-cache.o pinentry/argparse.o pinentry/secmem.o ${LDFLAGS} -lassuan -lgpgme -lgpg-error clean: @echo cleaning - @rm -f spine ${OBJ} + @rm -f pinentry-dmenu ${OBJ} $(MAKE) -C pinentry/ clean .PHONY: all options clean pinentry diff --git a/README b/README index 4009f6a..f4d499d 100644 --- a/README +++ b/README @@ -1,4 +1,5 @@ -spine - stupid pinentry replacement +pinentry-dmenu +============== I didn't like how long it takes to load pinentry-gtk/qt and pinentry-curses/tty is not always the option, so I duct-taped pinentry and dmenu together. diff --git a/config.h b/config.h index 5ad04a4..fa37f97 100644 --- a/config.h +++ b/config.h @@ -1,12 +1,12 @@ /* See LICENSE file for copyright and license details. */ static Bool topbar = True; static const char *fonts[]={ - "Dejavu Sans Mono:size=10" + "Noto Sans UI:size=13" }; -static char *secchar = "*"; -/*static char *description = NULL; -static char *prompt = "PIN:";*/ +static const char *secstring = "● ● "; +/*static char *description = NULL;*/ +static const char *prompt = "🔑 Pinentry "; static const char *normbgcolor = "#000000"; static const char *normfgcolor = "#ffffff"; -static const char *selbgcolor = "#ff0000"; +static const char *selbgcolor = "#d9904a"; static const char *selfgcolor = "#ffffff"; diff --git a/config.mk b/config.mk index 603102f..e8cf5ef 100644 --- a/config.mk +++ b/config.mk @@ -1,4 +1,4 @@ -# spine version +# pinentry-dmenu version VERSION = 0.1 # paths @@ -23,7 +23,7 @@ INCS = -I${X11INC} -I${FREETYPEINC} LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} # flags -CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +CPPFLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} CFLAGS = -ansi -pedantic -Wall -Os ${INCS} ${CPPFLAGS} LDFLAGS = -s ${LIBS} diff --git a/test b/test index 35d32bc..fdd8f84 100755 --- a/test +++ b/test @@ -1,9 +1,9 @@ #!/bin/sh -echo "SETDESC testing spine, type whatever +echo "SETDESC testing pinentry-dmenu, type whatever SETPROMPT whatever: GETPIN SETDESC type more of whatever: GETPIN SETDESC testing confirmation confirm -BYE" | ./spine +BYE" | ./pinentry-dmenu -- cgit v1.2.3