17 lines
312 B
Bash
Executable File
17 lines
312 B
Bash
Executable File
#!/bin/sh
|
|
|
|
files="$(find -L "$HOME/Tower/Library" -name '*.pdf' -or -name '*.epub')"
|
|
|
|
options=$(echo "$files" | xargs --delimiter="\n" basename -a)
|
|
|
|
chosen=$(echo "$options" | dmenu -i -ix -c -l 30)
|
|
|
|
[ -z "$chosen" ] && exit
|
|
|
|
line="$(($chosen + 1))"
|
|
|
|
file="$(echo "$files" | sed "${line}q;d")"
|
|
|
|
zathura "$file"
|
|
|