#!/bin/sh # not using it because security concerns, see: https://wiki.archlinux.org/title/Lf#Sandboxing_previews # references: # `man lf` PREVIEWING FILES section # maybe useful: # https://github.com/LukeSmithxyz/voidrice/tree/master/.config/lf # https://github.com/ranger/ranger/blob/master/ranger/data/scope.sh case "$1" in # atool has more outputs like file mode bits but slower #*.7z|*.zip|*.tar*) atool -l "$1";; *.tar*) tar tf "$1";; *.zip) unzip -l "$1";; *.rar) unrar-free l "$1";; *.7z) 7z l "$1";; # pdftotext has better output than mutool *.pdf) pdftotext "$1" -;; #*.pdf) mutool draw -F txt "$1";; *) highlight -O ansi -t4 "$1";; esac