dots/.bin/fzf-book

12 lines
491 B
Plaintext
Raw Normal View History

2022-05-11 13:55:36 +02:00
#!/usr/bin/env bash
# Find and open pdf
2022-09-22 20:46:42 +02:00
# Generate menu of book filenames and save paths
# Preview window contains metadata
2022-10-25 21:29:26 +02:00
# selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1 --preview 'pdfinfo {}' --preview-window=right:70%:wrap)"
selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1)"
2022-05-11 13:55:36 +02:00
2022-09-22 20:42:04 +02:00
# Open and redirect output to /dev/null
2022-10-25 21:29:26 +02:00
zathura "$selected" --fork