diff --git a/bootstrap/packages.txt b/bootstrap/packages.txt index a0f0eb5..674b898 100644 --- a/bootstrap/packages.txt +++ b/bootstrap/packages.txt @@ -256,7 +256,7 @@ waylock wl-clipboard clipman libqalculate -ydotool brightnessctl grim slurp +wtype diff --git a/pass/.local/bin/pass-pick b/pass/.local/bin/pass-pick index 02ccfe2..d494fdf 100755 --- a/pass/.local/bin/pass-pick +++ b/pass/.local/bin/pass-pick @@ -105,7 +105,7 @@ set_defaults() { KEY_ENTRYMENU_SHOWFIELD="${KEY_ENTRYMENU_SHOWFIELD:-$(get_config KEY_ENTRYMENU_SHOWFIELD Alt+s)}" KEY_ENTRYMENU_QUIT="${PP_KEY_ENTRYMENU_QUIT:-$(get_config KEY_ENTRYMENU_QUIT Alt+BackSpace)}" - AUTOFILL_BACKEND="${PP_AUTOFILL_BACKEND:-$(get_config AUTOFILL_BACKEND ydotool)}" + AUTOFILL_BACKEND="${PP_AUTOFILL_BACKEND:-$(get_config AUTOFILL_BACKEND wtype)}" AUTOFILL_CHAIN="${PP_AUTOENTRY_CHAIN:-$(get_config AUTOFILL_CHAIN 'username :tab password')}" AUTOFILL_DELAY="${PP_AUTOENTRY_DELAY:-$(get_config AUTOFILL_DELAY 30)}" PASS_USERNAME_FIELD="${PP_PASS_USERNAME_FIELD:-$(get_config PASS_USERNAME_FIELD 'username user login')}" @@ -213,7 +213,13 @@ _type() { local toolmode="$1" local key="$2" - if [ "$tool" = "xdotool" ]; then + if [ "$tool" = "wtype" ]; then + if [ "$toolmode" = "type" ]; then + "$tool" -s "${AUTOFILL_DELAY}" -- "$key" + elif [ "$toolmode" = "key" ]; then + "$tool" -s "${AUTOFILL_DELAY}" -k "$key" + fi + elif [ "$tool" = "xdotool" ]; then "$tool" "$toolmode" --delay "${AUTOFILL_DELAY}" "$key" elif [ "$tool" = "ydotool" ]; then "$tool" "$toolmode" --key-delay "${AUTOFILL_DELAY}" "$key"