From e4e520f6f6243dbf17d47019a882668d71ca31d7 Mon Sep 17 00:00:00 2001 From: AluminumTank Date: Tue, 13 Jul 2021 21:13:36 -0400 Subject: [PATCH] move to wtype --- README.md | 2 +- wofi-pass | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 16f836a..c6e74e5 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ version of `passmenu` that accomplishes everything I needed from `rofi-pass`. ## What does it do? This script uses [wofi](https://hg.sr.ht/~scoopta/wofi) and -[ydotool](https://github.com/ReimuNotMoe/ydotool) to provide a completely +[wtype](https://github.com/atx/wtype) to provide a completely Wayland-native way to conveniently use [pass](https://www.passwordstore.org/). It provides the same search that `passmenu` does, but shows a second dialogue that lets the user choose which field to copy/print. diff --git a/wofi-pass b/wofi-pass index 7e423b9..c2f44dd 100755 --- a/wofi-pass +++ b/wofi-pass @@ -1,5 +1,7 @@ #!/usr/bin/env bash +TYPE_CMD="wtype -" + _trim() { local var="$*" # remove leading whitespace characters @@ -101,11 +103,11 @@ if [[ $typeit -eq 0 ]]; then wl-copy "$(_pass_get $field)" else if [[ $field == "autotype" ]] || [[ $autotype -eq 1 ]]; then - _pass_get "username" | ydotool type --file - - printf "\t" | ydotool type --file - - _pass_get "password" | ydotool type --file - - printf "\n" | ydotool type --file - + _pass_get "username" | ${TYPE_CMD} + printf "\t" | ${TYPE_CMD} + _pass_get "password" | ${TYPE_CMD} + printf "\n" | ${TYPE_CMD} else - _pass_get $field | ydotool type --file - + _pass_get $field | ${TYPE_CMD} fi fi