summaryrefslogtreecommitdiff
path: root/.config/nnn/plugins/.ntfy
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2022-08-22 22:48:02 +0200
committeryuzu-eva <stevenhu@web.de>2022-08-22 22:48:02 +0200
commitb2abf7439ed3c8097bccd3f71f3f5410552ac7fe (patch)
treeb650fd81505e6d015e490cebf0aa9b4f0dba68c5 /.config/nnn/plugins/.ntfy
parent599e1315ce9be32944681ff4e88fc5afa8ae81b8 (diff)
switch from powerline to starship, added mpd & ncmpcpp configs. also using nnn now
Diffstat (limited to '.config/nnn/plugins/.ntfy')
-rwxr-xr-x.config/nnn/plugins/.ntfy22
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/nnn/plugins/.ntfy b/.config/nnn/plugins/.ntfy
new file mode 100755
index 0000000..2a61478
--- /dev/null
+++ b/.config/nnn/plugins/.ntfy
@@ -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