aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-05-24 23:38:44 +0200
committerRasmus Steinke <rasi@xssn.at>2016-05-24 23:38:44 +0200
commitb45065ab3bc531442e80339b580c3d28345c5bbc (patch)
tree1a18681d9372e6e9a26549b77e18d0a9df18acdb
parenteda475db8b1ce2d9dea6eb7a88d9027ec38a6253 (diff)
downloadrofi-pass-b45065ab3bc531442e80339b580c3d28345c5bbc.tar.gz
nicer representation
-rwxr-xr-xrofi-pass7
1 files changed, 6 insertions, 1 deletions
diff --git a/rofi-pass b/rofi-pass
index f3b5b09..69d150a 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -384,9 +384,14 @@ manageEntry () {
fi
}
+listgpg () {
+ find . -name \*.gpg -print | xargs -d '\n' -n 1 | cut -c 3- | while read line; do echo -e "$(basename "${line}")\t(In: "$(dirname "${line}")")"; done | column -s $'\t' -t
+}
+
insertPass () {
cd "${root}"
- name="$(echo -e "$(list_passwords 2>/dev/null)" | rofi -dmenu -mesg "Type name, make sure it is unique" -p "> ")"
+ name="$(listgpg | rofi -dmenu -mesg "Type name, make sure it is unique" -p "> ")"
+# name="$(echo -e "$(list_passwords 2>/dev/null)" | rofi -dmenu -mesg "Type name, make sure it is unique" -p "> ")"
val=$?
if [[ $val -eq 1 ]]; then exit; fi
user=$(echo -e "${default_user2}\n$USER\n${default_user}" | rofi -dmenu -mesg "Chose Username or type" -p "> ")