commit 753cf05e2faba378d7dff1d645aa8c29d9da878a
parent e94d05cd95523aceea9e8b0e5e51ddd3caa31d1b
Author: hhvn <dev@haydenvh.com>
Date: Tue, 2 Mar 2021 12:59:14 +0000
.scripts/bin/dpass: copy to clipboard when generated
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/.scripts/bin/dpass b/.scripts/bin/dpass
@@ -22,6 +22,12 @@ case "$chosen" in
newname=$(echo | dmenu -i -p "Name for passwd?")
[ "$newname" = "" ] && newname="pleaseeditthis"
echo "$newname: $new" >> $PASS
+ echo "$new" | xclip
+ (
+ sleep 25
+ # destroy clipboard to prevent accidental pasting
+ printf '' | xclip
+ ) &
;;
*)
printf "${passwd##*: }\n" | xclip