summaryrefslogtreecommitdiffstats
path: root/.config/ranger/scope.sh
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-07-08 13:29:31 -0400
committerLuke Smith <luke@lukesmith.xyz>2018-07-08 13:29:31 -0400
commit90f985a1f188c378b8481cb9a7ce0f8328311359 (patch)
treee96e2378a8d5d6059a0465d192c82cb3c167a18d /.config/ranger/scope.sh
parent16c66e574fb067a908c3802e629beb0bbf2f4240 (diff)
downloadeibhear-90f985a1f188c378b8481cb9a7ce0f8328311359.tar.gz
eibhear-90f985a1f188c378b8481cb9a7ce0f8328311359.tar.zst
eibhear-90f985a1f188c378b8481cb9a7ce0f8328311359.zip
pdf preview now first page
Diffstat (limited to '.config/ranger/scope.sh')
-rwxr-xr-x.config/ranger/scope.sh5
1 files 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;;