diff --git a/.bin/dmenu-read b/.bin/dmenu-read new file mode 100755 index 0000000..7790efa --- /dev/null +++ b/.bin/dmenu-read @@ -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