aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--config.example9
-rw-r--r--keepass2import.py4
3 files changed, 14 insertions, 10 deletions
diff --git a/README.md b/README.md
index 9d3e9bf..f9d5070 100644
--- a/README.md
+++ b/README.md
@@ -16,24 +16,25 @@
* Auto Type User and Password. Format of password files are expected to be like:
```
foobarmysecurepassword
-UserName: MyUser
-URL: http://my.url.foo
+user: MyUser
+url: http://my.url.foo
```
* Auto Typing of more than one field. This expects a autotype field in password file.
```
foobarmysecurepassword
---
-UserName: MyUser
+user: MyUser
SomeField: foobar
AnotherField: barfoo
-URL: http://my.url.foo
+url: http://my.url.foo
autotype: SomeField :tab UserName :tab AnotherField :tab pass
```
The `:tab` field has a special meaning. this will hit the tab key, obviously.<br>
Same for `:space`, which will hit the space key, can be used to activate checkboxes.
+In addition to those `:enter` and `:delay` are available.
* All Hotkeys are configurable in config file
-* Username, URL and autotype field names are also configurable
+* user, url and autotype field names are also configurable
## Requirements
* pass (https://github.com/zx2c4/password-store)
diff --git a/config.example b/config.example
index 397ed9b..75086c0 100644
--- a/config.example
+++ b/config.example
@@ -5,13 +5,16 @@
# keep in mind that 0.15.7 has different arguments compared to
# latest git. for rofi-pass this means that "-i" will not work with
# 0.15.7.
-rofiopts="-no-levenshtein-sort"
+rofiopts="-i -width 1000 -no-levenshtein-sort"
# fields to be used
-URL_field='URL'
-USERNAME_field='UserName'
+URL_field='url'
+USERNAME_field='user'
AUTOTYPE_field='autotype'
+# delay to be used for :delay keyword
+delay=2
+
## Programs to be used
# Editor
EDITOR='gvim -f'
diff --git a/keepass2import.py b/keepass2import.py
index 00e9a44..7461040 100644
--- a/keepass2import.py
+++ b/keepass2import.py
@@ -60,8 +60,8 @@ def password_data(element, path=''):
username = get_value(element, 'UserName')
url = get_value(element, 'URL')
notes = get_value(element, 'Notes')
- data = "%sUserName: %s\n" % (data, username)
- data = "%sURL: %s\n" % (data, url)
+ data = "%suser: %s\n" % (data, username)
+ data = "%surl: %s\n" % (data, url)
data = "%s%s\n" % (data, notes)
return data