Files
dotfiles/television/dot-config/television/cable/pdf-files.toml
T

25 lines
462 B
TOML

[metadata]
name = "pdf-files"
description = "Browse PDF files"
requirements = ["fd", "pdftotext"]
[source]
command = [
"fd -t f -e pdf .",
"fd -t f -e pdf -H .",
]
[preview]
command = "pdftotext -l 2 -layout '{}' - 2>/dev/null | head -100 || file '{}'"
[ui]
layout = "portrait"
[keybindings]
enter = "actions:open"
[actions.open]
description = "Open the selected PDF with default viewer"
command = "xdg-open '{}' 2>/dev/null || open '{}'"
mode = "fork"