From 71be9f77b5b7372331486545711a88bf266e493c Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sat, 23 May 2015 17:44:24 +0200 Subject: [PATCH] add new message mode --- rofi-pass | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/rofi-pass b/rofi-pass index afe0206..52c9bf5 100755 --- a/rofi-pass +++ b/rofi-pass @@ -37,12 +37,14 @@ xdotool_type() { } notify () { - notify-send "Help" "Alt+1: Autotype (Default)\nAlt+2: Type User\nAlt+3: Type Password\nAlt+4: Open in Browser\nAlt+5: Show/Edit" +7aa3C2 } mainMenu () { - notify - selected_password="$(echo -e "[ Add Entry ]\n---\n$(list_passwords 2>/dev/null)" | rofi -dmenu -select "$entry" -p "Alt+9 for Help - rofi-pass > ")" + #notify + HELP='Alt+1: Autotype | Alt+2: Type User | Alt+3: Type Password +Alt+4: Open URL | Alt+5: Show/Edit' + selected_password="$(echo -e "[ Add Entry ]\n---\n$(list_passwords 2>/dev/null)" | rofi -mesg "${HELP}" -dmenu -select "$entry" -p "rofi-pass > ")" rofi_exit=$? case ${rofi_exit} in @@ -56,10 +58,6 @@ mainMenu () { exit ;; 14) show - ;; - 18) notify - entry="$selected_password" - mainMenu ;; 1) exit ${rofi_exit} @@ -137,7 +135,7 @@ mainMenu () { show () { while true; do - menu=$(echo -e "Return to Main Menu\n---\nEdit Entry\n---\n$(pass "$selected_password")" | rofi -dmenu -p "Alt+1: Copy Selection to Clipboard (Default) | Alt+2: Open Selection in Browser") + menu=$(echo -e "Return to Main Menu\n---\nEdit Entry\n---\n$(pass "$selected_password")" | rofi -dmenu -mesg 'Alt+1: Copy Selection to Clipboard (Default) | Alt+2: Open Selection in Browser' -p "Choose Entry > ") val=$? @@ -164,20 +162,6 @@ show () { done } -globalMenu () { - menu=$(echo -e "0 Exit\n---\n1. Autotype Entries\n2. Insert Entry" | rofi -dmenu -p "TypePasswd > ") - - if [[ $menu == "1. Autotype Entries" ]]; then - mainMenu "$root" - elif [[ $menu == "2. Insert Entry" ]]; then - insertPass - elif [[ $menu == "0 Exit" ]]; then - exit - elif [[ $menu == "" ]]; then - exit - fi -} - insertPass () { quiT () { if [[ $? -eq 1 ]]; then