mirror of
https://github.com/prdlk/television.git
synced 2026-11-02 13:12:51 +00:00
25 lines
514 B
TOML
25 lines
514 B
TOML
[metadata]
|
|
name = "pdf-files"
|
|
description = "Browse PDF files"
|
|
requirements = ["fd", "pdftotext"]
|
|
|
|
[source]
|
|
command = [
|
|
{ name = "Default", run = "fd -t f -e pdf ." },
|
|
{ name = "Hidden", run = "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"
|