[PATCH] passmenu: add support for dmenu-wl on wayland

Jason A. Donenfeld Jason at zx2c4.com
Wed Jul 29 16:17:48 CEST 2020


On Wed, Jul 29, 2020 at 3:32 PM sternenseemann
<sternenseemann at systemli.org> wrote:
>
> Additionally prevent the use of xdotool on wayland.
> ---
>  contrib/dmenu/README.md |  3 +++
>  contrib/dmenu/passmenu  | 16 +++++++++++++++-
>  2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md
> index 9d54fb4..c5d0191 100644
> --- a/contrib/dmenu/README.md
> +++ b/contrib/dmenu/README.md
> @@ -4,6 +4,8 @@ clipboard without having to open up a terminal window if you don't already have
>  one open. If `--type` is specified, the password is typed using [xdotool][]
>  instead of copied to the clipboard.
>
> +On wayland [dmenu-wl][] is used to replace dmenu.
> +
>  # Usage
>
>      passmenu [--type] [dmenu arguments...]
> @@ -11,3 +13,4 @@ instead of copied to the clipboard.
>  [dmenu]: http://tools.suckless.org/dmenu/
>  [xdotool]: http://www.semicomplete.com/projects/xdotool/
>  [pass]: http://www.zx2c4.com/projects/password-store/
> +[dmune-wl]: https://github.com/nyyManni/dmenu-wayland
> diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
> index 83268bc..0eee575 100755
> --- a/contrib/dmenu/passmenu
> +++ b/contrib/dmenu/passmenu
> @@ -8,12 +8,26 @@ if [[ $1 == "--type" ]]; then
>         shift
>  fi
>
> +if [[ -n $WAYLAND_DISPLAY ]]; then
> +       if [[ $typeit -eq 0 ]]; then
> +               dmenu=dmenu-wl
> +       else
> +               echo "Error: --type is not supported on wayland" >&2

That's a bummer. Any way that --type can become supported? Or does
this break fundamental wayland security barriers?


More information about the Password-Store mailing list