diff options
author | Ayush Agarwal <ayush@fastmail.in> | 2021-09-08 00:37:23 +0530 |
---|---|---|
committer | Ayush Agarwal <ayush@fastmail.in> | 2021-09-08 00:37:23 +0530 |
commit | 7e1fe8e7b5130e6b05b25d071ae4625752c7a2ce (patch) | |
tree | ffcb0d20a7ddb4e4caccc8bf1495a7bffe37157f /tessen | |
parent | 0b9f1ec9cbc513dd41a23998f96d10482ceb7444 (diff) |
create `clean` and `die` function
The `clean` function will copy password store data for a specific amount
of time and then clear it. The `die` function is meant to clear the
clipboard and other sensitive data immediately.
Diffstat (limited to 'tessen')
-rwxr-xr-x | tessen | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -196,14 +196,18 @@ autotype_key_menu() { fi } -# cleanup jobs before the script exits clean() { + { + sleep "$CLIP_TIME" + wl-copy --clear + } > /dev/null 2>&1 & + disown + unset -v PASSFILE USERNAME PASSWORD PASSDATA_ARR CHOICE +} + +die() { wl-copy --clear - unset -v PASSFILE - unset -v USERNAME - unset -v PASSWORD - unset -v PASSDATA_ARR - unset -v CHOICE + unset -v PASSFILE USERNAME PASSWORD PASSDATA_ARR CHOICE } main() { |