From 24fcbcb81a579297904e50148af13748ed2807e2 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 19 Dec 2018 15:13:22 +0000 Subject: [PATCH] Makes ranger prefiew PSD files and use bat for text files --- config/ranger/scope.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/ranger/scope.sh b/config/ranger/scope.sh index 2a97e429..58b78bc4 100755 --- a/config/ranger/scope.sh +++ b/config/ranger/scope.sh @@ -57,6 +57,11 @@ if [ "$preview_images" = "True" ]; then # unsupported types. image/svg+xml) inkscape -e "${cached//.png}" "$path" && exit 6;; + image/vnd.adobe.photoshop) + #echo $cached + convert "$path" -background white -flatten "$cached" + exit 6 + ;; image/*) exit 7;; # Image preview for video, disabled by default.: @@ -112,6 +117,7 @@ case "$mimetype" in pygmentize_format=terminal highlight_format=ansi 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 pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; } exit 2;;