From 992bcb2ee0c6d2a3ea54a704c7154c015f68ec3f Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sat, 30 May 2015 11:15:04 +0200 Subject: [PATCH] allow non-root structure --- config.example | 6 ++++++ rofi-pass | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.example b/config.example index 9afa699..7061692 100644 --- a/config.example +++ b/config.example @@ -15,3 +15,9 @@ BROWSER='chromium' ## Misc settings help_color="#0C73C2" + +## rofi expects a root directory in your basedir +## underneath this directory all your password groups +## are stored inside directories. +## if you don't want to separate roots, enable this setting +#root=. diff --git a/rofi-pass b/rofi-pass index 77a3ac0..eb7ce08 100755 --- a/rofi-pass +++ b/rofi-pass @@ -20,7 +20,7 @@ if [[ -z $BROWSER ]]; then fi if [[ -n "$root" ]]; then - root="$root" + root="${root}" else if [[ $(find "$basedir" -maxdepth 1 \( ! -name '.*' \) -type d | wc -l) == "1" ]]; then root="$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \;)" @@ -158,7 +158,7 @@ show () { elif [[ "$menu" == "" ]]; then exit elif [[ "$menu" == "Return to Main Menu" ]]; then - globalMenu + mainMenu else if [[ $(echo "$menu" | grep ": ") == "" ]]; then if [[ $val -eq 11 ]]; then