A pinentry program with the charm of dmenu. Forked from https://github.com/ritze/pinentry-dmenu
Find a file
Sigrid Solveig Haflínudóttir dad5154a71 don't print "No config file found..." message
On systems where musl is used as the libc, printf on pipe causes
libc to check whether the output is a terminal (by calling ioctl
TIOCGWINSZ) which results in broken pipe when an "OK" message is
written. Creating an empty config file was the workaround, but
it probably makes more sense to just disable the message altogether,
as it's not supposed to be seen by the user regardless.

	openat(AT_FDCWD, "/home/ftrvx/.gnupg/pinentry-dmenu.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
	ioctl(1, TIOCGWINSZ, 0x7ff2ba8a98)      = -1 ENOTTY (Not a tty)
	writev(1, [{iov_base="", iov_len=0}, {iov_base="No config file found. Use defaul"..., iov_len=36}], 2) = 36
	brk(NULL)                               = 0x558549b000
	brk(0x55854a0000)                       = 0x55854a0000
	getuid()                                = 1000
	mlock(0x558549b020, 16384)              = 0
	geteuid()                               = 1000
	getuid()                                = 1000
	geteuid()                               = 1000
	getuid()                                = 1000
	geteuid()                               = 1000
	dup(0)                                  = 3
	dup(1)                                  = 4
	write(4, "OK Pleased to meet you, process "..., 37) = -1 EPIPE (Broken pipe)
	--- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=25113, si_uid=1000} ---
2022-01-20 16:44:25 +01:00
pinentry Add VERSION and PACKAGE_BUGREPORT 2017-09-23 15:46:12 +02:00
.gitignore Add gitignore 2018-01-25 10:14:21 +01:00
config.h Disable buttom mode as default 2017-09-23 15:47:15 +02:00
config.mk Add DATE and update BUGREPORT 2017-09-24 10:19:15 +02:00
drw.c Revert some changes and add old code from dmenu 2017-08-01 20:00:08 +02:00
drw.h Revert some changes and add old code from dmenu 2017-08-01 20:00:08 +02:00
LICENSE Use GPLv2 satisfy pinentry's requirements 2017-09-25 15:14:23 +02:00
Makefile Add dist, install and uninstall commands 2017-09-25 01:28:29 +02:00
pinentry-dmenu.1 fix typo in the config 'bottom' 2019-01-24 00:23:29 +02:00
pinentry-dmenu.c don't print "No config file found..." message 2022-01-20 16:44:25 +01:00
README.md fix typo in the config 'bottom' 2019-01-24 00:23:29 +02:00
test Add repeat function 2018-01-25 14:17:57 +01:00
util.c Revert some changes and add old code from dmenu 2017-08-01 20:00:08 +02:00
util.h Revert some changes and add old code from dmenu 2017-08-01 20:00:08 +02:00

pinentry-dmenu

pinentry-dmenu is a pinentry program with the charm of dmenu.

This program is a fork from spine which is also a fork from dmenu.

Requirements

In order to build dmenu you need the Xlib header files.

Installation

Edit config.mk to match your local setup (dmenu is installed into the /usr/local namespace by default).

Afterwards enter the following command to build and install dmenu (if necessary as root):

make clean install

Config

To use pinentry-dmenu add in ~/.gnupg/gpg-agent.conf:

pinentry-program <absolut path to pinentry-dmenu>

The config is located in ~/.gnupg/pinentry-dmenu.conf.

Parameter Default Description
asterisk * Defines the symbol which is showed for each typed character
bottom false pinentry-dmenu appears at the bottom of the screen
min_password_length 32 The minimal space of the password field. This value has affect to the description field after the password field
monitor -1 pinentry-dmenu is displayed on the monitor number supplied. Monitor numbers are starting from 0
prompt "" Defines the prompt to be displayed to the left of the input field
font monospace:size=10 Defines the font or font set used
prompt_bg #bbbbbb Defines the prompt background color
prompt_fg #222222 Defines the prompt foreground color
normal_bg #bbbbbb Defines the normal background color
normal_fg #222222 Defines the normal foreground color
select_bg #eeeeee Defines the selected background color
select_fg #005577 Defines the selected foreground color
desc_bg #bbbbbb Defines the description background color
desc_fg #222222 Defines the description foreground color
embedded false Embed into window

Example

asterisk= "# ";
prompt = "$";
font = "Noto Sans UI:size=13";
prompt_fg = "#eeeeee";
prompt_bg = "#d9904a";
normal_fg = "#ffffff";
normal_bg = "#000000";
select_fg = "#eeeeee";
select_bg = "#d9904a";
desc_fg = "#eeeeee";
desc_bg = "#d9904a";