aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/nuke
diff options
context:
space:
mode:
authorGravatar CodeforEvolution <secundaja@gmail.com>2020-08-09 16:44:11 -0500
committerGravatar CodeforEvolution <secundaja@gmail.com>2020-08-09 22:19:51 -0500
commit6f9571a805e715d38ad6f5c7594a7e829368d617 (patch)
tree40ccadbf0287ea9ad4da4ae477eed26b212c025e /plugins/nuke
parent966fe839eee2f25ec2ed548234c9edfe984ebcfa (diff)
downloadnnn-6f9571a805e715d38ad6f5c7594a7e829368d617.tar.gz
Haiku: General fixup, add icon, add rdef file
- 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
Diffstat (limited to 'plugins/nuke')
-rwxr-xr-xplugins/nuke14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/nuke b/plugins/nuke
index 2c47ce0..f2abe65 100755
--- a/plugins/nuke
+++ b/plugins/nuke
@@ -32,7 +32,7 @@
# 3. Start GUI apps in bg to unblock. Redirect stdout and strerr if required.
# 4. Some CLI utilities are piped to the $PAGER, to wait and quit uniformly.
# 5. If the output cannot be paged use "read -r _" to wait for user input.
-# 6. On a DE, try 'xdg-open' in handle_fallback() as last resort.
+# 6. On a DE, try 'xdg-open' or 'open' in handle_fallback() as last resort.
#
# Feel free to change the utilities to your favourites and add more mimes.
#
@@ -42,7 +42,7 @@
# rar: list with unrar
# 7-zip: list with 7z
# pdf: zathura (GUI), pdftotext, mutool, exiftool
-# audio: mocplay (nnn plugin using MOC), mpv, mediainfo, exiftool
+# audio: mocplay (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# avi|mkv|mp4: smplayer, mpv (GUI), ffmpegthumbnailer, mediainfo, exiftool
# log: vi
# torrent: rtorrent, transmission-show
@@ -53,7 +53,7 @@
# Multimedia by mime:
# image/*: imv/sxiv (GUI), viu (https://github.com/atanunq/viu), img2txt, exiftool
# video/*: smplayer, mpv (GUI), ffmpegthumbnailer, mediainfo, exiftool
-# audio/*: mocplay (nnn plugin using MOC), mpv, mediainfo, exiftool
+# audio/*: mocplay (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# application/pdf: zathura (GUI), pdftotext, mutool, exiftool
# Other mimes:
# text/troff: man -l
@@ -107,6 +107,9 @@ handle_audio() {
elif which mpv >/dev/null 2>&1; then
mpv "${FPATH}" >/dev/null 2>&1 &
exit 0
+ elif which media_client >/dev/null 2>&1; then
+ media_client play "${FPATH}" >/dev/null 2>&1 &
+ exit 0
elif which mediainfo >/dev/null 2>&1; then
mediainfo "${FPATH}" | eval "$PAGER"
exit 0
@@ -459,9 +462,12 @@ handle_mime() {
}
handle_fallback() {
- if [ "$GUI" -ne 0 ]; then
+ if [ "$GUI" -ne 0 ] && which xdg-open >/dev/null 2>&1; then
xdg-open "${FPATH}" >/dev/null 2>&1 &
exit 0
+ elif [ "$GUI" -ne 0 ] && which open >/dev/null 2>&1; then
+ open "${FPATH}" >/dev/null 2>&1 &
+ exit 0
fi
echo '----- File details -----' && file --dereference --brief -- "${FPATH}"