]> git.zndr.dk Git - dotfiles.git/commitdiff
Cleanup scope.sh
authorJannik ZANDER <jannikz@gmail.com>
Sat, 7 Jul 2018 18:58:57 +0000 (20:58 +0200)
committerJannik ZANDER <jannikz@gmail.com>
Sat, 7 Jul 2018 18:58:57 +0000 (20:58 +0200)
.config/ranger/scope.sh

index 4ce5cc987df44cf4f5cd35250852b21c10df37e3..2ca3aab55312a9dea651d2aca80e6b5589ed3594 100755 (executable)
@@ -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/*)