You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
439 B
Plaintext
10 lines
439 B
Plaintext
4 years ago
|
#!/usr/bin/env sh
|
||
|
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry)
|
||
|
# https://www.youtube.com/user/gotbletu
|
||
|
# DESC: open only calibre ebooks
|
||
|
# DEPEND: fzf mlocate xdg-utils util-linux
|
||
|
|
||
|
selected="$(locate -ir 'calibre.*\.\(cbz\|cbr\|epub\|pdf\|mobi\|azw3\)$' | fzf -e -i -m --reverse --delimiter / --with-nth -4,-3,-2,-1)"
|
||
|
[ -z "$selected" ] && exit
|
||
|
echo "$selected" | while read -r line ; do setsid xdg-open "$line" ; done
|