move to wtype
This commit is contained in:
parent
8305359a9a
commit
e4e520f6f6
@ -13,7 +13,7 @@ version of `passmenu` that accomplishes everything I needed from `rofi-pass`.
|
|||||||
|
|
||||||
## What does it do?
|
## What does it do?
|
||||||
This script uses [wofi](https://hg.sr.ht/~scoopta/wofi) and
|
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/).
|
Wayland-native way to conveniently use [pass](https://www.passwordstore.org/).
|
||||||
It provides the same search that `passmenu` does, but shows a second dialogue
|
It provides the same search that `passmenu` does, but shows a second dialogue
|
||||||
that lets the user choose which field to copy/print.
|
that lets the user choose which field to copy/print.
|
||||||
|
12
wofi-pass
12
wofi-pass
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TYPE_CMD="wtype -"
|
||||||
|
|
||||||
_trim() {
|
_trim() {
|
||||||
local var="$*"
|
local var="$*"
|
||||||
# remove leading whitespace characters
|
# remove leading whitespace characters
|
||||||
@ -101,11 +103,11 @@ if [[ $typeit -eq 0 ]]; then
|
|||||||
wl-copy "$(_pass_get $field)"
|
wl-copy "$(_pass_get $field)"
|
||||||
else
|
else
|
||||||
if [[ $field == "autotype" ]] || [[ $autotype -eq 1 ]]; then
|
if [[ $field == "autotype" ]] || [[ $autotype -eq 1 ]]; then
|
||||||
_pass_get "username" | ydotool type --file -
|
_pass_get "username" | ${TYPE_CMD}
|
||||||
printf "\t" | ydotool type --file -
|
printf "\t" | ${TYPE_CMD}
|
||||||
_pass_get "password" | ydotool type --file -
|
_pass_get "password" | ${TYPE_CMD}
|
||||||
printf "\n" | ydotool type --file -
|
printf "\n" | ${TYPE_CMD}
|
||||||
else
|
else
|
||||||
_pass_get $field | ydotool type --file -
|
_pass_get $field | ${TYPE_CMD}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user