add possiblity to define root folder
This commit is contained in:
parent
92c26557ec
commit
c8116f19b3
12
rofi-pass
12
rofi-pass
@ -19,10 +19,14 @@ if [[ -z $BROWSER ]]; then
|
|||||||
export BROWSER=xdg-open
|
export BROWSER=xdg-open
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(find "$basedir" -maxdepth 1 \( ! -name '.*' \) -type d | wc -l) == "1" ]]; then
|
if [[ -n "$root" ]]; then
|
||||||
root="$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \;)"
|
root="$root"
|
||||||
else
|
else
|
||||||
root=$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \; | rofi -dmenu -p "Choose Database")
|
if [[ $(find "$basedir" -maxdepth 1 \( ! -name '.*' \) -type d | wc -l) == "1" ]]; then
|
||||||
|
root="$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \;)"
|
||||||
|
else
|
||||||
|
root=$(find "${basedir}" -maxdepth 1 \( ! -name '.*' \) -type d -exec basename {} \; | rofi -dmenu -p "Choose Database")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
list_passwords() {
|
list_passwords() {
|
||||||
@ -74,6 +78,8 @@ Alt+4: Open URL | Alt+5: Show/Edit</span>"
|
|||||||
globalMenu
|
globalMenu
|
||||||
elif [[ "$selected_password" == "[ Add Entry ]" ]]; then
|
elif [[ "$selected_password" == "[ Add Entry ]" ]]; then
|
||||||
insertPass
|
insertPass
|
||||||
|
elif [[ "$selected_password" == "" ]]; then
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
password_temp=$(pass "$selected_password")
|
password_temp=$(pass "$selected_password")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user