summaryrefslogtreecommitdiff
path: root/dmenu_books
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu_books')
-rwxr-xr-xdmenu_books19
1 files changed, 19 insertions, 0 deletions
diff --git a/dmenu_books b/dmenu_books
new file mode 100755
index 0000000..3b6f1fe
--- /dev/null
+++ b/dmenu_books
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+printhelp () {
+ exit
+}
+
+while getopts "hd:" o; do case "${o}" in
+ d) ARGS="$ARGS$OPTARG " ;;
+ *) printhelp ;;
+esac done
+
+DMENU="dmenu"
+DEFARGS="-l 15 -p"
+
+BOOK=`ls ~/Documents/shared | $DMENU $DEFARGS \"books\" $ARGS`
+
+[ -z "$BOOK" ] && exit 1
+
+zathura "~/Documents/shared/$BOOK"