mirror of
https://github.com/sebaschi/dotfiles.git
synced 2026-07-02 03:20:35 +02:00
25 lines
462 B
TOML
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"
|