Makes ranger prefiew PSD files and use bat for text files

master
Jonathan Hodgson 6 years ago
parent a05fae0f87
commit 24fcbcb81a
  1. 6
      config/ranger/scope.sh

@ -57,6 +57,11 @@ if [ "$preview_images" = "True" ]; then
# unsupported types. # unsupported types.
image/svg+xml) image/svg+xml)
inkscape -e "${cached//.png}" "$path" && exit 6;; inkscape -e "${cached//.png}" "$path" && exit 6;;
image/vnd.adobe.photoshop)
#echo $cached
convert "$path" -background white -flatten "$cached"
exit 6
;;
image/*) image/*)
exit 7;; exit 7;;
# Image preview for video, disabled by default.: # Image preview for video, disabled by default.:
@ -112,6 +117,7 @@ case "$mimetype" in
pygmentize_format=terminal pygmentize_format=terminal
highlight_format=ansi highlight_format=ansi
fi fi
bat --style="numbers" --color always "$path" && { dump | trim; exit 5; }
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; } try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; } try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
exit 2;; exit 2;;

Loading…
Cancel
Save