diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-12-12 19:51:08 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-12-12 19:51:08 +0530 |
commit | fd8a8387b8a21216ae379f6a8c448c82fd52fd28 (patch) | |
tree | 915ce95e9ed0842fe7a86dfe160e0052826dbc65 /plugins/.ntfy | |
parent | f95ee54870e2259e9384c6f5641cb6d374526a65 (diff) | |
download | nnn-fd8a8387b8a21216ae379f6a8c448c82fd52fd28.tar.gz |
Add option to show noti and copy selection to system clipboard
Diffstat (limited to 'plugins/.ntfy')
-rwxr-xr-x | plugins/.ntfy | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/.ntfy b/plugins/.ntfy new file mode 100755 index 0000000..fe0e18a --- /dev/null +++ b/plugins/.ntfy @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Description: Show a notification +# +# Details: nnn invokes this plugin to show notification when a cp/mv/rm operation is complete. +# +# Requires: notify-send (Ubuntu)/ntfy (https://github.com/dschep/ntfy)/osascript (macOS) +# +# Shell: POSIX compliant +# Author: Anna Arad + +OS="$(uname)" + +if which notify-send >/dev/null 2>&1; then + notify-send nnn "Done!" +elif [ "$OS" = "Darwin" ]; then + osascript -e 'display notification "Done!" with title "nnn"' +elif which ntfy >/dev/null 2>&1; then + ntfy -t nnn send "Done!" +fi |