fzf-pass: kill after 30s
parent
43b19c3935
commit
3851e23343
|
@ -5,9 +5,11 @@ if [ -z "$ENTRY" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
PASSENTRY=$(pass "$ENTRY")
|
PASSENTRY=$(pass "$ENTRY")
|
||||||
# todo: kill after 30s
|
builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f -n &
|
||||||
builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f &
|
WLCOPY_PID=$!
|
||||||
disown
|
disown -h
|
||||||
|
nohup bash -c "sleep 30s; kill $WLCOPY_PID" &
|
||||||
|
disown -h
|
||||||
|
|
||||||
NOTIFICATION=$(builtin echo "$PASSENTRY" | sed 1d)
|
NOTIFICATION=$(builtin echo "$PASSENTRY" | sed 1d)
|
||||||
notify-send -t 6000 "$NOTIFICATION"
|
notify-send -t 6000 "$NOTIFICATION"
|
||||||
|
|
Loading…
Reference in New Issue