summaryrefslogtreecommitdiffstats
path: root/.local/bin/opendoc
blob: c0930cb00620c10bccc1b9953af7fb30207cbe52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

cd ~/library/ || exit 1
file=$(find -L . \( -iname '*.pdf' -or -iname '*djvu' \) -type f \
  -printf '%P\n' | sort | dmenu -i -l 10)
if test -f "$file"; then
  case "$file" in
    *.pdf)
      zathura "$file" &
      #sioyek "$file" &
      ;;
    *.djvu)
      zathura "$file" &
      ;;
  esac
fi