Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:f64b634dd8
This commit is contained in:
13
dots/.bin/dmenu-read
Executable file
13
dots/.bin/dmenu-read
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Open pdf by title
|
||||
# Note: does not handle incorrect metadata
|
||||
|
||||
dir=/home/h/doc/books
|
||||
|
||||
ag -g ".pdf$" $dir \
|
||||
| xargs -n1 -d '\n' pdfinfo 2> /dev/null \
|
||||
| grep "Title: " \
|
||||
| awk '{for (i=2; i<NF; i++) printf $i " "; printf $NF; printf "\n"}' \
|
||||
| grep -v "Title:"\
|
||||
| dmenu -i -p "Read:"
|
||||
Reference in New Issue
Block a user