[PATCH v2 3/3] passmenu: default to wtype for --type on wayland

sternenseemann sternenseemann at systemli.org
Fri Jun 11 22:26:03 UTC 2021


wtype seems like a more sensible default over ydotool:

* it handles unicode correctly by generating a temporary keyboard layout

* it uses wayland protocols instead of uinput, requiring no extra
  privileges or permissions

It doesn't work properly with Xwayland at the moment though [1],
but this doesn't seem that terrible these days.

[1]: https://github.com/atx/wtype/issues/1
---
 contrib/dmenu/README.md | 7 ++-----
 contrib/dmenu/passmenu  | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md
index 4b13e5b..3863cbf 100644
--- a/contrib/dmenu/README.md
+++ b/contrib/dmenu/README.md
@@ -4,9 +4,7 @@ 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 and [ydotool][] to replace xdotool.
-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.
+On wayland [dmenu-wl][] is used to replace dmenu and [wtype][] to replace xdotool.
 
 # Usage
 
@@ -24,5 +22,4 @@ You can influence the behavior of `passmenu` via the following environment varia
 [xdotool]: http://www.semicomplete.com/projects/xdotool/
 [pass]: http://www.zx2c4.com/projects/password-store/
 [dmenu-wl]: https://github.com/nyyManni/dmenu-wayland
-[ydotool]: https://github.com/ReimuNotMoe/ydotool
-[uinput]: https://www.kernel.org/doc/html/v4.12/input/uinput.html
+[wtype]: https://github.com/ReimuNotMoe/ydotool
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 431da4a..878d88a 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -11,7 +11,7 @@ fi
 # decide which fallback programs to use depending on window system
 if [[ -n $WAYLAND_DISPLAY ]]; then
 	def_menu_program=dmenu-wl
-	def_type_program="ydotool type --file -"
+	def_type_program="wtype -"
 elif [[ -n $DISPLAY ]]; then
 	def_menu_program=dmenu
 	def_type_program="xdotool type --clearmodifiers --file -"
-- 
2.31.1



More information about the Password-Store mailing list