mirror of
https://github.com/hydroxycarbamide/dotfiles.git
synced 2025-05-07 21:39:07 -04:00
Add nnn
This commit is contained in:
parent
0ef5de12ac
commit
c0889285ff
58 changed files with 5175 additions and 0 deletions
22
dot_config/nnn/plugins/executable_dot_ntfy
Normal file
22
dot_config/nnn/plugins/executable_dot_ntfy
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/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 type notify-send >/dev/null 2>&1; then
|
||||
notify-send nnn "Done!"
|
||||
elif [ "$OS" = "Darwin" ]; then
|
||||
osascript -e 'display notification "Done!" with title "nnn"'
|
||||
elif type ntfy >/dev/null 2>&1; then
|
||||
ntfy -t nnn send "Done!"
|
||||
elif [ "$OS" = "Haiku" ]; then
|
||||
notify --title "nnn" "Done!"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue