mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 08:32:36 +00:00
Merge be03c21a84
into ad04944bdf
This commit is contained in:
commit
c1cfc3604e
|
@ -69,6 +69,9 @@ else
|
||||||
echo "No xembed term found" >&2
|
echo "No xembed term found" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if type xdg-user-dir >/dev/null 2>&1 ; then
|
||||||
|
PICTURES_DIR=$(xdg-user-dir PICTURES)
|
||||||
|
fi
|
||||||
|
|
||||||
term_nuke () {
|
term_nuke () {
|
||||||
# $1 -> $XID, $2 -> $FILE
|
# $1 -> $XID, $2 -> $FILE
|
||||||
|
@ -177,7 +180,17 @@ previewer_loop () {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
inode/directory)
|
inode/directory)
|
||||||
|
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" &
|
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
text/*)
|
text/*)
|
||||||
if [ -x "$NUKE" ] ; then
|
if [ -x "$NUKE" ] ; then
|
||||||
|
|
Loading…
Reference in a new issue