[gopass] Standardize autofill variables
Some variables were called autoentry, some autofill, some did not carry any signifier. Unified this to use autofill in their variable name.
This commit is contained in:
parent
5733f928fa
commit
76b5335661
2 changed files with 10 additions and 10 deletions
|
|
@ -63,10 +63,10 @@ set_defaults() {
|
|||
KEY_ENTRYMENU_CLIP="${RGP_KEY_ENTRYMENU_CLIP:-$(get_config KEY_ENTRYMENU_CLIP Alt+Return)}"
|
||||
KEY_ENTRYMENU_QUIT="${RGP_KEY_ENTRYMENU_QUIT:-$(get_config KEY_ENTRYMENU_QUIT Alt+BackSpace)}"
|
||||
|
||||
BACKEND="${RGP_BACKEND:-$(get_config BACKEND xdotool)}"
|
||||
AUTOFILL_BACKEND="${RGP_BACKEND:-$(get_config AUTOFILL_BACKEND xdotool)}"
|
||||
AUTOFILL_CHAIN="${RGP_AUTOENTRY_CHAIN:-$(get_config AUTOFILL_CHAIN 'username :tab password')}"
|
||||
AUTOFILL_DELAY="${RGP_AUTOENTRY_DELAY:-$(get_config AUTOFILL_DELAY 30)}"
|
||||
GOPASS_USERNAME_FIELD="${RGP_GOPASS_USERNAME_FIELD:-$(get_config GOPASS_USERNAME_FIELD 'username user login')}"
|
||||
AUTOENTRY_CHAIN="${RGP_AUTOENTRY_CHAIN:-$(get_config AUTOENTRY_CHAIN 'username :tab password')}"
|
||||
AUTOENTRY_DELAY="${RGP_AUTOENTRY_DELAY:-$(get_config AUTOENTRY_DELAY 30)}"
|
||||
}
|
||||
|
||||
# exit on escape pressed
|
||||
|
|
@ -133,14 +133,14 @@ list_fields() {
|
|||
|
||||
# invoke the dotool to type inputs
|
||||
_type() {
|
||||
local tool="${BACKEND}"
|
||||
local tool="${AUTOFILL_BACKEND}"
|
||||
local toolmode="$1"
|
||||
local key="$2"
|
||||
|
||||
"$tool" "$toolmode" --delay "${AUTOENTRY_DELAY}" "$key"
|
||||
"$tool" "$toolmode" --delay "${AUTOFILL_DELAY}" "$key"
|
||||
}
|
||||
|
||||
# automatically enter entry chain, set via AUTOENTRY_CHAIN
|
||||
# automatically fill out fields
|
||||
# transform special chain entries into valid dotool commands
|
||||
autofill() {
|
||||
local selected="${1}"
|
||||
|
|
@ -207,7 +207,7 @@ entrymenu() {
|
|||
}
|
||||
|
||||
main() {
|
||||
local autoentry_chain="${AUTOENTRY_CHAIN}"
|
||||
local autoentry_chain="${AUTOFILL_CHAIN}"
|
||||
local k_autofill="${KEY_AUTOFILL}"
|
||||
local k_fill_user="${KEY_FILL_USER}"
|
||||
local k_clip_user="${KEY_CLIP_USER}"
|
||||
|
|
|
|||
|
|
@ -39,15 +39,15 @@ To use environment variables to configure any of these options or keys, prefix t
|
|||
|
||||
Additional configuration options:
|
||||
|
||||
* `BACKEND`
|
||||
* `AUTOFILL_BACKEND`
|
||||
:sets the auto-filling tool used, only tested with `xdotool` currently.
|
||||
|
||||
* `AUTOENTRY_CHAIN`
|
||||
* `AUTOFILL_CHAIN`
|
||||
:sets the chain of keys that should be sent to auto-fill an entry. Can use the following special fields: `:tab`, `:space`, `:return`, `username`, `password`.
|
||||
|
||||
The default chain is `username :tab password`, which will enter the username, simulate the tab-key to switch from the username to the password field, and enter the password. This can be changed to suit your needs. To, for example, log in fully automatically at the end of the sequence, change it to `username :tab password :return`, and there will be no further user input for the login required.
|
||||
|
||||
* `AUTOENTRY_DELAY`
|
||||
* `AUTOFILL_DELAY`
|
||||
:sets the time for xdotool to wait in-between simulated actions, if some letters appear missing or the fields are not switched between quickly enough, it can usually be fixed by increasing this delay (though typing will also take longer)
|
||||
|
||||
* `GOPASS_USERNAME_FIELD`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue