implement custom keybindings

This commit is contained in:
Rasmus Steinke 2015-06-17 19:50:21 +02:00
parent 0d78505bfd
commit a7a25d34be
2 changed files with 19 additions and 15 deletions

View File

@ -15,3 +15,10 @@ BROWSER='chromium'
## Misc settings ## Misc settings
help_color="#0C73C2" help_color="#0C73C2"
autotype="Alt+1"
type_user="Alt+2"
type_pass="Alt+3"
open_url="Alt+4"
copy_name="Alt+c"
copy_pass="Alt+Shift+c"

View File

@ -57,10 +57,6 @@ xdotool_type() {
done done
} }
notify () {
7aa3C2
}
mainMenu () { mainMenu () {
if [[ -z "$root" ]]; then if [[ -z "$root" ]]; then
get_root get_root
@ -85,9 +81,9 @@ mainMenu () {
mainMenu manage mainMenu manage
fi fi
else else
HELP="<span color='$help_color'>Alt+1: Autotype | Alt+2: Type User | Alt+3: Type Password HELP="<span color='$help_color'>${autotype}: Autotype | ${type_user}: Type User | ${type_pass}: Type Password
Alt+4: Open URL | Alt+c: Copy Username | Alt+Shift+c: Copy Password</span>" ${open_url}: Open URL | ${copy_name}: Copy Username | ${copy_pass}: Copy Password</span>"
selected_password="$(echo -e "[ Add Entry ]>\n[ Manage Database ]>\n---\n$(list_passwords 2>/dev/null)" | rofi -mesg "${HELP}" -dmenu -select "$entry" -kb-custom-8 "Alt+c" -kb-custom-9 "Alt+Shift+c" -p "rofi-pass > ")" selected_password="$(echo -e "[ Add Entry ]>\n[ Manage Database ]>\n---\n$(list_passwords 2>/dev/null)" | rofi -mesg "${HELP}" -dmenu -kb-custom-1 "${autotype}" -kb-custom-2 "${type_user}" -kb-custom-3 "${type_pass}" -kb-custom-4 "${open_url}" -kb-custom-5 "${copy_name}" -kb-custom-6 "${copy_pass}" -dmenu -select "$entry" -kb-custom-8 "Alt+c" -kb-custom-9 "Alt+Shift+c" -p "rofi-pass > ")"
rofi_exit=$? rofi_exit=$?
if [[ "${rofi_exit}" -eq 0 ]]; then true; if [[ "${rofi_exit}" -eq 0 ]]; then true;
elif [[ "${rofi_exit}" -eq 10 ]]; then true; elif [[ "${rofi_exit}" -eq 10 ]]; then true;
@ -276,6 +272,7 @@ password_gen () {
mainMenu mainMenu
help_msg () { help_msg () {
echo "rofi-pass - a rofi driven frontend to pass" echo "rofi-pass - a rofi driven frontend to pass"
echo "--------------------------------------" echo "--------------------------------------"