mirror of https://github.com/jarun/nnn.git
preview-tabbed: simplified thubmnail view check
This commit is contained in:
parent
ac6b31ad0e
commit
be03c21a84
|
@ -180,15 +180,11 @@ previewer_loop () {
|
|||
fi
|
||||
;;
|
||||
inode/directory)
|
||||
if [[ -n $PICTURES_DIR && "$FILE" == *"$PICTURES_DIR"* ]] ; then
|
||||
if find "$FILE" -maxdepth 1 | file -bLf- --mime-type | grep -q image ; then
|
||||
if type sxiv >/dev/null 2>&1 ; then
|
||||
sxiv -te "$XID" "$FILE" &
|
||||
elif type nsxiv >/dev/null 2>&1 ; then
|
||||
nsxiv -te "$XID" "$FILE" &
|
||||
else
|
||||
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||
fi
|
||||
if [[ -n $PICTURES_DIR && "$FILE" == "$PICTURES_DIR"* ]] ; then
|
||||
if type sxiv >/dev/null 2>&1 ; then
|
||||
sxiv -te "$XID" "$FILE" &
|
||||
elif type nsxiv >/dev/null 2>&1 ; then
|
||||
nsxiv -te "$XID" "$FILE" &
|
||||
else
|
||||
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue