2022-05-11 13:55:36 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
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-12-02 13:27:32 +01:00
|
|
|
echo "Opening \"$selected\""
|
|
|
|
|
|
|
|
# Open when a file is selected and redirect output to /dev/null
|
|
|
|
[[ -n "$selected" ]] && zathura "$selected" --fork &> /dev/null
|