summaryrefslogtreecommitdiff
path: root/dmenu_books
blob: 3b6f1fe6264865749343299e6f14720183a3e493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"