From c646cb1f703fdf0440b1e1b8db90481de378f5a4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 11 Sep 2020 09:05:39 +0200 Subject: [PATCH] pass: Add toggling of password reveal state Previously, the password could only be revealed -- once revealed it could not be obfuscated anymore. Now the obfuscated/deobfuscated state can be toggled by hitting the corresponding keymapping repeatedly (default Alt+s in entry menu). --- pass/.local/bin/rofi-pass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pass/.local/bin/rofi-pass b/pass/.local/bin/rofi-pass index e843b50..c16a187 100755 --- a/pass/.local/bin/rofi-pass +++ b/pass/.local/bin/rofi-pass @@ -65,7 +65,7 @@ set_defaults() { KEY_ENTRYMENU_SHOWFIELD="${KEY_ENTRYMENU_SHOWFIELD:-$(get_config KEY_ENTRYMENU_SHOWFIELD Alt+s)}" KEY_ENTRYMENU_QUIT="${RP_KEY_ENTRYMENU_QUIT:-$(get_config KEY_ENTRYMENU_QUIT Alt+BackSpace)}" - AUTOFILL_BACKEND="${RP_BACKEND:-$(get_config AUTOFILL_BACKEND xdotool)}" + AUTOFILL_BACKEND="${RP_AUTOFILL_BACKEND:-$(get_config AUTOFILL_BACKEND xdotool)}" AUTOFILL_CHAIN="${RP_AUTOENTRY_CHAIN:-$(get_config AUTOFILL_CHAIN 'username :tab password')}" AUTOFILL_DELAY="${RP_AUTOENTRY_DELAY:-$(get_config AUTOFILL_DELAY 30)}" PASS_USERNAME_FIELD="${RP_PASS_USERNAME_FIELD:-$(get_config PASS_USERNAME_FIELD 'username user login')}" @@ -241,7 +241,13 @@ entrymenu() { main ;; "13") - entrymenu "$entry" "true" + local toggle + if [ "$deobfuscate" = "true" ]; then + toggle=false + else + toggle=true + fi + entrymenu "$entry" "$toggle" ;; esac }