aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-25 23:44:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-25 23:45:49 +1200
commitfaa2b56f0baef9c5809e1ca4cdb06699f6066f79 (patch)
treea913be6ee632b232729d1d6153f91b52ed03cfe7 /bin
parentxyzzy(6) to print to stderr (diff)
downloaddotfiles-faa2b56f0baef9c5809e1ca4cdb06699f6066f79.tar.gz
dotfiles-faa2b56f0baef9c5809e1ca4cdb06699f6066f79.zip
Add notifications to dmp(1)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dmp7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/dmp b/bin/dmp
index d25082dd..fabb61a2 100755
--- a/bin/dmp
+++ b/bin/dmp
@@ -26,4 +26,9 @@ pw=$(
[ -n "$pw" ] || exit
# Pump the password into the clipboard xsel(2); allow 10 seconds
-pass show "$pw" | xsel -ibt "$((timeout_sec * 1000))"
+pass show "$pw" | xsel -ibt "$((timeout_sec * 1000))" || exit
+
+# If we have notify-send(1), alert that the password has been copied
+if command -v notify-send >/dev/null >&2 ; then
+ notify-send "$(printf '%s in clipboard' "$pw")"
+fi