aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-11-14 07:09:28 +0100
committerRasmus Steinke <rasi@xssn.at>2015-11-14 07:09:28 +0100
commitfb38d4ef9b02a966998274a513b2440c033bb990 (patch)
treeffe6add8f8d25c76d10c68115feb49fa32fb18f8
parentc66fabf4d0ff1b979810f5b00e045a8420204adb (diff)
downloadrofi-pass-fb38d4ef9b02a966998274a513b2440c033bb990.tar.gz
add return options
-rwxr-xr-xrofi-pass9
1 files changed, 6 insertions, 3 deletions
diff --git a/rofi-pass b/rofi-pass
index b91f242..95bb970 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -225,29 +225,32 @@ else unset help; mainMenu; fi
typeMenu () {
checkIfPass
- typefield=$(echo -e "password\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
+ typefield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
if [[ $typefield == "" ]]; then exit;
elif [[ $typefield == "password" ]]; then typePass;
+ elif [[ $typefield == "< Return" ]]; then mainMenu;
else typeField
fi
}
copyMenu () {
checkIfPass
- copyfield=$(echo -e "password\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
+ copyfield=$(echo -e "< Return\n---\npassword\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
if [[ $copyfield == "" ]]; then exit;
elif [[ $copyfield == "password" ]]; then copyPass;
+ elif [[ $copyfield == "< Return" ]]; then mainMenu;
else copyField
fi
}
actionMenu () {
checkIfPass
- action=$(echo -e "1 Move Password File\n2 Delete Password File\\n3 Edit Password File\n4 Generate New Password" | rofi -dmenu -p "Choose Action > ")
+ action=$(echo -e "< Return\n---\n1 Move Password File\n2 Delete Password File\\n3 Edit Password File\n4 Generate New Password" | rofi -dmenu -p "Choose Action > ")
if [[ ${action} == "1 Move Password File" ]]; then manageEntry move;
elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete;
elif [[ ${action} == "3 Edit Password File" ]]; then manageEntry edit;
elif [[ ${action} == "4 Generate New Password" ]]; then generatePass;
+ elif [[ ${action} == "< Return" ]]; then mainMenu;
elif [[ ${action} == "" ]]; then exit
fi
}