allow non-root structure
This commit is contained in:
parent
c8116f19b3
commit
992bcb2ee0
@ -15,3 +15,9 @@ BROWSER='chromium'
|
|||||||
## Misc settings
|
## Misc settings
|
||||||
|
|
||||||
help_color="#0C73C2"
|
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=.
|
||||||
|
@ -20,7 +20,7 @@ if [[ -z $BROWSER ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$root" ]]; then
|
if [[ -n "$root" ]]; then
|
||||||
root="$root"
|
root="${root}"
|
||||||
else
|
else
|
||||||
if [[ $(find "$basedir" -maxdepth 1 \( ! -name '.*' \) -type d | wc -l) == "1" ]]; then
|
if [[ $(find "$basedir" -maxdepth 1 \( ! -name '.*' \) -type d | wc -l) == "1" ]]; then
|
||||||
root="$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \;)"
|
root="$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \;)"
|
||||||
@ -158,7 +158,7 @@ show () {
|
|||||||
elif [[ "$menu" == "" ]]; then
|
elif [[ "$menu" == "" ]]; then
|
||||||
exit
|
exit
|
||||||
elif [[ "$menu" == "Return to Main Menu" ]]; then
|
elif [[ "$menu" == "Return to Main Menu" ]]; then
|
||||||
globalMenu
|
mainMenu
|
||||||
else
|
else
|
||||||
if [[ $(echo "$menu" | grep ": ") == "" ]]; then
|
if [[ $(echo "$menu" | grep ": ") == "" ]]; then
|
||||||
if [[ $val -eq 11 ]]; then
|
if [[ $val -eq 11 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user