dotfiles/.config/clifm/profiles/default/preview.clifm

58 lines
2.0 KiB
Plaintext

######################################
# Configuration file for Shotgun #
# CliFM's file previewer #
######################################
# Commented and blank lines are omitted
# It is recommended to edit this file setting your preferred applications
# first: the previewing process will be smoother and faster this way
# You can even remove whatever applications you don't use
# For syntax details consult the mimelist.clifm file
# Uncomment this line to use pistol (or any other previewing program)
#.*=pistol
# Uncomment and edit this line to use Ranger's scope script:
#.*=/home/USER/.config/ranger/scope.sh %f 120 80 /tmp/clifm/ True
# Directories
inode/directory=exa -a --tree --level=1 --;lsd -A --tree --depth=1 --color=always;tree -a -L 1;ls -Ap --color=always --indicator-style=none;
# Web content
^text/html$=w3m -dump;lynx -dump --;elinks -dump;pandoc -s -t markdown --;
# Text
^text/rtf=catdoc --;
N:.*\.json$=jq --color-output . ;python -m json.tool --;
N:.*\.md$=glow -s dark --;mdcat --;
^text/.*=highlight -f --out-format=xterm256 --force --;bat --style=plain --color=always --;cat --;
# Office documents
N:.*\.xlsx$=xlsx2csv --;file -b --;
N:.*\.(odt|ods|odp|sxw)$=odt2txt;pandoc -s -t markdown --;
^application/(.*wordprocessingml.document|.*epub+zip|x-fictionbook+xml)=pandoc -s -t markdown --;
^application/msword=catdoc --;file -b --;
^application/ms-excel=xls2csv --;file -b --;
# Archives
N:.*\.rar=unrar lt -p- --;
application/zstd=file -b --;true
application/(zip|gzip|x-7z-compressed|x-xz|x-bzip*|x-tar)=atool --list --;bsdtar --list --file;
# PDF
^application/pdf$=pdftotext -l 10 -nopgbrk -q -- %f -;mutool draw -F txt -i --;exiftool;
# Image, video, and audio
^image/vnd.djvu=djvutxt;exiftool;
^image/.*=exiftool;
^video/.*=mediainfo;exiftool;
^audio/.*=mediainfo;exiftool;
# Torrent:
application/x-bittorrent=transmission-show --;
# Fallback
.*=file -b --;true;