.ntfy (624B)
1 #!/usr/bin/env sh 2 3 # Description: Show a notification 4 # 5 # Details: nnn invokes this plugin to show notification when a cp/mv/rm operation is complete. 6 # 7 # Dependencies: notify-send (Ubuntu)/ntfy (https://github.com/dschep/ntfy)/osascript (macOS)/notify (Haiku) 8 # 9 # Shell: POSIX compliant 10 # Author: Anna Arad 11 12 OS="$(uname)" 13 14 if type notify-send >/dev/null 2>&1; then 15 notify-send nnn "Done!" 16 elif [ "$OS" = "Darwin" ]; then 17 osascript -e 'display notification "Done!" with title "nnn"' 18 elif type ntfy >/dev/null 2>&1; then 19 ntfy -t nnn send "Done!" 20 elif [ "$OS" = "Haiku" ]; then 21 notify --title "nnn" "Done!" 22 fi