From 3ce08eded035c4775532fd55f29ec038a2c7186e Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Wed, 17 Jun 2015 19:52:51 +0200 Subject: add more custom keybindings --- config.example | 4 ++++ rofi-pass | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.example b/config.example index de0e7d5..e85f577 100644 --- a/config.example +++ b/config.example @@ -22,3 +22,7 @@ type_pass="Alt+3" open_url="Alt+4" copy_name="Alt+c" copy_pass="Alt+Shift+c" +edit="Alt+1" +move="Alt+2" +delete="Alt+3" +show="Alt+4" diff --git a/rofi-pass b/rofi-pass index e7c231a..6edd449 100755 --- a/rofi-pass +++ b/rofi-pass @@ -65,8 +65,8 @@ mainMenu () { root="$2" fi if [[ $1 == "manage" ]]; then - HELP="Alt+1: Edit Entry | Alt+2: Move Entry | Alt+3: Delete Entry | Alt+4 Show Entry" - selected_password="$(echo -e "0 Return to Main Menu\n---\n$(list_passwords 2>/dev/null)" | rofi -mesg "${HELP}" -dmenu -select "$entry" -p "rofi-pass > ")" + HELP="${edit}: Edit Entry | ${move}: Move Entry | ${delete}: Delete Entry | ${show}: Show Entry" + selected_password="$(echo -e "0 Return to Main Menu\n---\n$(list_passwords 2>/dev/null)" | rofi -custom-kb-1 "${edit}" -custom-kb-2 "${move}" -custom-kb-3 "${delete}" -custom-kb-4 "${show}" -mesg "${HELP}" -dmenu -select "$entry" -p "rofi-pass > ")" rofi_exit=$? if [[ "${rofi_exit}" -eq 0 ]]; then true; elif [[ "${rofi_exit}" -eq 10 ]]; then manageEntry edit; -- cgit