From 90f985a1f188c378b8481cb9a7ce0f8328311359 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 8 Jul 2018 13:29:31 -0400 Subject: [PATCH] pdf preview now first page --- .config/ranger/scope.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh index a25fda2..34e7fb1 100755 --- a/.config/ranger/scope.sh +++ b/.config/ranger/scope.sh @@ -75,8 +75,9 @@ case "$extension" in try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;; # PDF documents: pdf) - try pdftotext -l 10 -nopgbrk -q "$path" - && \ - { dump | trim | fmt -s -w $width; exit 0; } || exit 1;; + try pdftoppm -jpeg -singlefile "$path" "${cached//.jpg}" && exit 6 || exit 1;; + #try pdftotext -l 10 -nopgbrk -q "$path" - && \ + #{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;; # BitTorrent Files torrent) try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;