From 4d3a3e6b61f68cdd273ca94556cfa3b32b31827f Mon Sep 17 00:00:00 2001 From: Ayush Agarwal Date: Wed, 16 Feb 2022 23:46:27 +0530 Subject: refactor: clear the clipboard when necessary clearing the clipboard isn't needed when in autotype only mode --- tessen | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tessen b/tessen index 14c241b..9d5ded7 100755 --- a/tessen +++ b/tessen @@ -610,8 +610,11 @@ validate_action() { } _clear() { - wl-copy --clear - unset -v tsn_passfile tsn_username tsn_password tsn_passdata chosen_key + if [[ "$tsn_action" =~ ^(copy|both|default)$ ]]; then + wl-copy --clear + fi + unset -v tsn_passfile tsn_passdata tsn_username tsn_password tsn_url + unset -v tsn_autotype chosen_key } _die() { -- cgit v1.2.3