aboutsummaryrefslogtreecommitdiff
path: root/tessen
diff options
context:
space:
mode:
authorAyush Agarwal <ayush@fastmail.in>2021-09-08 00:37:23 +0530
committerAyush Agarwal <ayush@fastmail.in>2021-09-08 00:37:23 +0530
commit7e1fe8e7b5130e6b05b25d071ae4625752c7a2ce (patch)
treeffcb0d20a7ddb4e4caccc8bf1495a7bffe37157f /tessen
parent0b9f1ec9cbc513dd41a23998f96d10482ceb7444 (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-xtessen16
1 files changed, 10 insertions, 6 deletions
diff --git a/tessen b/tessen
index 0bf76de..b9ae885 100755
--- a/tessen
+++ b/tessen
@@ -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() {