diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-25 23:44:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-25 23:45:49 +1200 |
commit | faa2b56f0baef9c5809e1ca4cdb06699f6066f79 (patch) | |
tree | a913be6ee632b232729d1d6153f91b52ed03cfe7 /bin | |
parent | xyzzy(6) to print to stderr (diff) | |
download | dotfiles-faa2b56f0baef9c5809e1ca4cdb06699f6066f79.tar.gz dotfiles-faa2b56f0baef9c5809e1ca4cdb06699f6066f79.zip |
Add notifications to dmp(1)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dmp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |