[PATCH 1/1] passmenu: use PASSWORD_STORE_DMENU program if set
ivanbrennan
ivan.brennan at gmail.com
Wed Dec 31 03:47:27 UTC 2025
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
More information about the Password-Store
mailing list