diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh index 2aced3d..d2a68b1 100755 --- a/.config/ranger/scope.sh +++ b/.config/ranger/scope.sh @@ -58,12 +58,12 @@ handle_extension() { exit 1;; # PDF - pdf) - # Preview as text conversion - pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 - mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5 - exiftool "${FILE_PATH}" && exit 5 - exit 1;; + #pdf) + # # Preview as text conversion + # pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 + # mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5 + # exiftool "${FILE_PATH}" && exit 5 + # exit 1;; # BitTorrent torrent) @@ -115,14 +115,14 @@ handle_image() { ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 exit 1;; # PDF - # application/pdf) - # pdftoppm -f 1 -l 1 \ - # -scale-to-x 1920 \ - # -scale-to-y -1 \ - # -singlefile \ - # -jpeg -tiffcompression jpeg \ - # -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ - # && exit 6 || exit 1;; + application/pdf) + pdftoppm -f 1 -l 1 \ + -scale-to-x 1920 \ + -scale-to-y -1 \ + -singlefile \ + -jpeg -tiffcompression jpeg \ + -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ + && exit 6 || exit 1;; # Preview archives using the first image inside. # (Very useful for comic book collections for example.)