From ivan.brennan at gmail.com Wed Dec 31 03:47:26 2025 From: ivan.brennan at gmail.com (ivanbrennan) Date: Tue, 30 Dec 2025 22:47:26 -0500 Subject: [PATCH 0/1] Controlling which menu program passmenu uses Message-ID: <20251231040111.10004-1-ivan.brennan@gmail.com> Hi, I'd like to propose a small change to passmenu that would allow the user to control which menu program (dmenu, tofi, etc.) is used. This would introduce an optional environment variable, PASSWORD_STORE_DMENU. A usage example, PASSWORD_STORE_DMENU=tofi passmenu Thanks, Ivan ivanbrennan (1): passmenu: use PASSWORD_STORE_DMENU program if set contrib/dmenu/README.md | 3 +++ contrib/dmenu/passmenu | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.51.0 From ivan.brennan at gmail.com Wed Dec 31 03:47:27 2025 From: ivan.brennan at gmail.com (ivanbrennan) Date: Tue, 30 Dec 2025 22:47:27 -0500 Subject: [PATCH 1/1] passmenu: use PASSWORD_STORE_DMENU program if set In-Reply-To: <20251231040111.10004-1-ivan.brennan@gmail.com> References: <20251231040111.10004-1-ivan.brennan@gmail.com> Message-ID: <20251231040111.10004-2-ivan.brennan@gmail.com> Introduce a PASSWORD_STORE_DMENU environment variable the user can set to specify a program that passmenu should use in place of dmenu. --- contrib/dmenu/README.md | 3 +++ contrib/dmenu/passmenu | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md index 8a196cb..dcba945 100644 --- a/contrib/dmenu/README.md +++ b/contrib/dmenu/README.md @@ -8,6 +8,9 @@ On wayland [dmenu-wl][] is used to replace dmenu and [ydotool][] to replace xdot Note that the latter requires access to the [uinput][] device, so you'll probably need to add an extra udev rule or similar to give certain non-root users permission. +You can replace dmenu with a different program by setting the `PASSWORD_STORE_DMENU` +environment variable. + # Usage passmenu [--type] [dmenu arguments...] diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu index 76d92ab..1e06175 100755 --- a/contrib/dmenu/passmenu +++ b/contrib/dmenu/passmenu @@ -9,10 +9,10 @@ if [[ $1 == "--type" ]]; then fi if [[ -n $WAYLAND_DISPLAY ]]; then - dmenu=dmenu-wl + dmenu="${PASSWORD_STORE_DMENU:-dmenu-wl}" xdotool="ydotool type --file -" elif [[ -n $DISPLAY ]]; then - dmenu=dmenu + dmenu="${PASSWORD_STORE_DMENU:-dmenu}" xdotool="xdotool type --clearmodifiers --file -" else echo "Error: No Wayland or X11 display detected" >&2 -- 2.51.0