added check for ESC keypresses

This commit is contained in:
Rasmus Steinke 2015-11-14 05:33:36 +01:00
parent 908bcd4586
commit ba2e8fd918

View File

@ -210,15 +210,19 @@ ${copy_menu}: Copy Custom Field
--- ---
${action_menu}: Edit, Move, Delete, Re-generate Submenu ${action_menu}: Edit, Move, Delete, Re-generate Submenu
${show}: Show Password File" | rofi -dmenu -p "Help > ") ${show}: Show Password File" | rofi -dmenu -p "Help > ")
if [[ $help == "" ]]; then exit;
else unset help; mainMenu; fi
} }
typeMenu () { typeMenu () {
typefield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ") typefield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ")
if [[ $typefield == "" ]]; then exit; fi
typeField typeField
} }
copyMenu () { copyMenu () {
copyfield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ") copyfield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ")
if [[ $copyfield == "" ]]; then exit; fi
copyField copyField
} }
@ -227,6 +231,7 @@ actionMenu () {
if [[ ${action} == "1 Move Password File" ]]; then manageEntry move; if [[ ${action} == "1 Move Password File" ]]; then manageEntry move;
elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete; elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete;
elif [[ ${action} == "3 Generate New Password" ]]; then generatePass; elif [[ ${action} == "3 Generate New Password" ]]; then generatePass;
elif [[ ${action} == "" ]]; then exit
fi fi
} }