From: Jannik ZANDER Date: Sat, 7 Jul 2018 18:58:57 +0000 (+0200) Subject: Cleanup scope.sh X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=84686409ac2a5df4852d8d042b4363edccf2097d;p=dotfiles.git Cleanup scope.sh --- diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh index 4ce5cc9..2ca3aab 100755 --- a/.config/ranger/scope.sh +++ b/.config/ranger/scope.sh @@ -90,24 +90,13 @@ case "$extension" in # HTML Pages: htm|html|xhtml) try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } - try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } - try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } ;; # fall back to highlight/cat if the text browsers fail esac case "$mimetype" in # Syntax highlight for text files: text/* | */xml) - if [ "$(tput colors)" -ge 256 ]; then - pygmentize_format=terminal256 - highlight_format=xterm256 - else - pygmentize_format=terminal - highlight_format=ansi - fi -# try safepipe /usr/share/source-highlight/src-hilite-lesspipe.sh --out-format=${highlight_format} "$path" && { dump | trim; exit 5; } try safepipe less "$path" && { dump | trim; exit 5; } - try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; } exit 2;; # Ascii-previews of images: image/*)