mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
6f9571a805
- Add a native vector icon for Haiku (it hasn't been Haiku-ified yet however) - Add a rdef file (specifies application metadata) - Add clipboard support, notififcation support, and basic nuke support - Fix support for fortunes on Haiku ("-s" option is not available on Haiku) - Cleanup Haiku recipe
23 lines
626 B
Bash
Executable file
23 lines
626 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# Description: Show a notification
|
|
#
|
|
# Details: nnn invokes this plugin to show notification when a cp/mv/rm operation is complete.
|
|
#
|
|
# Dependencies: notify-send (Ubuntu)/ntfy (https://github.com/dschep/ntfy)/osascript (macOS)/notify (Haiku)
|
|
#
|
|
# 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!"
|
|
elif [ "$OS" = "Haiku" ]; then
|
|
notify --title "nnn" "Done!"
|
|
fi
|