From d51d5f6be2e25f31a1314900ec74239bb72f7412 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 13 Nov 2016 00:47:42 +1300 Subject: Simplify/correct dmp(1) copying Remove timeout feature; not working anyway --- bin/dmp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/dmp b/bin/dmp index fabb61a2..2c412081 100755 --- a/bin/dmp +++ b/bin/dmp @@ -1,8 +1,5 @@ #!/bin/sh -# Sole optional argument is the password timeout (defaults to 10 seconds) -timeout_sec=${1:-10} - # Get the password store directory, bail if we can't pwsd=${PASSWORD_STORE_DIR:-$HOME/.password-store} pwsd=${pwsd%/} @@ -25,8 +22,8 @@ pw=$( # Bail if we don't have a password [ -n "$pw" ] || exit -# Pump the password into the clipboard xsel(2); allow 10 seconds -pass show "$pw" | xsel -ibt "$((timeout_sec * 1000))" || exit +# Pump the first line of the password into the clipboard +pass show "$pw" | sed 1q | xsel -ib || exit # If we have notify-send(1), alert that the password has been copied if command -v notify-send >/dev/null >&2 ; then -- cgit v1.2.3