fix fzf password script

This commit is contained in:
Yorick van Pelt 2024-06-08 11:02:27 +02:00
parent c9cf97e650
commit d6f0f86e9f
Signed by: yorick
GPG key ID: D8D3CC6D951384DE

View file

@ -5,10 +5,7 @@ if [ -z "$ENTRY" ]; then
exit 1
fi
PASSENTRY=$(pass "$ENTRY")
(builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f -n --sensitive) &
WLCOPY_PID=$!
disown -h
nohup bash -c "sleep 30s; kill $WLCOPY_PID" &
(builtin echo "$PASSENTRY" | head -n1 | timeout 30 wl-copy -f -n --sensitive) &
disown -h
NOTIFICATION=$(builtin echo "$PASSENTRY" | sed 1d)