aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2018-08-28 17:21:49 +0200
committerRasmus Steinke <rasi@xssn.at>2018-08-28 17:21:49 +0200
commita2232751291ed2ba3b8e7d0435fa00a931d9d890 (patch)
tree1803916624494f519bfacb58d453a2d59e7614ce
parentbedf843393424a14097e155423e5733bee32079a (diff)
downloadrofi-pass-a2232751291ed2ba3b8e7d0435fa00a931d9d890.tar.gz
quick workaround to add new entries with custom password generator. fixes #144
-rw-r--r--config.example5
-rwxr-xr-xrofi-pass2
2 files changed, 6 insertions, 1 deletions
diff --git a/config.example b/config.example
index 2aba361..7464bb5 100644
--- a/config.example
+++ b/config.example
@@ -7,6 +7,11 @@ _rofi () {
rofi -i -no-auto-select "$@"
}
+# default command to generate passwords
+_pwgen () {
+ pwgen -y "$@"
+}
+
# image viewer to display qrcode of selected entry
# qrencode is needed to generate the image and a viewer
# that can read from pipes. Known viewers to work are feh and display
diff --git a/rofi-pass b/rofi-pass
index 5a54cca..3834030 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -714,7 +714,7 @@ insertPass () {
pw=$(printf '%s' "Generate" | _rofi -dmenu -p "Password > " -mesg "Type Password or hit Enter to generate one")
if [[ $pw == "Generate" ]]; then
- pw=$(pwgen "${password_length}")
+ pw=$(_pwgen "${password_length}")
fi
clear