diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-05-06 04:36:26 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-05-06 04:36:26 +0530 |
commit | c360f5c90894c6d3c4065d678d52c08445466016 (patch) | |
tree | 7c0129447c2a8fd3601985390a1225b5b377b735 | |
parent | 33c4b1e7a21434dd0b7157d143c66f8015c0ec36 (diff) | |
download | nnn-c360f5c90894c6d3c4065d678d52c08445466016.tar.gz |
which prints to screen
-rwxr-xr-x | plugins/preview-tabbed | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/preview-tabbed b/plugins/preview-tabbed index db94fdc..7e7e840 100755 --- a/plugins/preview-tabbed +++ b/plugins/preview-tabbed @@ -54,11 +54,11 @@ PAGER=${PAGER:-"vim -R"} NUKE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke" -if which xterm ; then +if which xterm >/dev/null 2>&1 ; then TERMINAL="xterm -into" -elif which urxvt ; then +elif which urxvt >/dev/null 2>&1 ; then TERMINAL="urxvt -embed" -elif which st ; then +elif which st >/dev/null 2>&1 ; then TERMINAL="st -w" else echo "No xembed term found" >&2 @@ -131,28 +131,28 @@ previewer_loop () { case "$MIME" in video/*) - if which mpv ; then + if which mpv >/dev/null 2>&1 ; then mpv --force-window=immediate --loop-file --wid="$XID" "$FILE" & else term_nuke "$XID" "$FILE" fi ;; audio/*) - if which mpv ; then + if which mpv >/dev/null 2>&1 ; then mpv --force-window=immediate --loop-file --wid="$XID" "$FILE" & else term_nuke "$XID" "$FILE" fi ;; image/*) - if which sxiv ; then + if which sxiv >/dev/null 2>&1 ; then sxiv -e "$XID" "$FILE" & else term_nuke "$XID" "$FILE" fi ;; application/pdf) - if which zathura ; then + if which zathura >/dev/null 2>&1 ; then zathura -e "$XID" "$FILE" & else term_nuke "$XID" "$FILE" |