diff --git a/rofi-pass b/rofi-pass index e08c7fd..e1951e7 100755 --- a/rofi-pass +++ b/rofi-pass @@ -118,6 +118,15 @@ viewEntry () { } generatePass () { + askGen () { + askGenMenu=$(echo -e "Yes\nNo" | rofi -dmenu -p "Generate new Password for ${selected_password}? > ") + if [[ $askGenMenu == "Yes" ]]; then + true + elif [[ $askGenMenu == "No" ]]; then + generatePass + fi + } + checkIfPass symbols=$(echo -e "0 Cancel\n---\n1 Yes\n2 No" | rofi -dmenu -p "Use Symbols? > ") if [[ $symbols == "0 Cancel" ]]; then mainMenu; @@ -126,6 +135,7 @@ generatePass () { fi HELP="Enter Number or hit Enter to use default length" length=$(echo -e "" | rofi -dmenu -mesg "${HELP}" -p "Password length? (Default: ${passlength}) > ") + askGen if [[ $length == "" ]]; then pass generate ${symbols} -i "$selected_password" "${passlength}" > /dev/null; else pass generate ${symbols} -i "$selected_password" "${length}" > /dev/null; fi @@ -149,7 +159,6 @@ ${line3}" -kb-custom-6 "${copy_pass}" \ -kb-custom-7 "${show}" \ -kb-custom-8 "${copy_url}" \ - -kb-custom-9 "${edit}" \ -kb-custom-13 "${type_menu}" \ -kb-custom-14 "${action_menu}" \ -kb-custom-15 "${copy_menu}" \ @@ -198,9 +207,10 @@ ${line3}" helpMenu () { help=$(echo -e "${type_user}: Type User +${autotype}: Autotype +${type_user}: Type Username ${type_pass}: Type Password ${type_menu}: Type Custom Field -${autotype}: Autotype --- ${copy_name}: Copy Username ${copy_pass}: Copy Password @@ -233,10 +243,11 @@ copyMenu () { actionMenu () { checkIfPass - action=$(echo -e "1 Move Password File\n2 Delete Password File\n3 Generate New Password" | rofi -dmenu -p "Choose Action > ") + action=$(echo -e "1 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 Generate New Password" ]]; then generatePass; + elif [[ ${action} == "4 Edit Password File" ]]; then manageEntry edit; + elif [[ ${action} == "4 Generate New Password" ]]; then generatePass; elif [[ ${action} == "" ]]; then exit fi }