Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
LIBRARY="$HOME/Library"
function display() {
books=$(find $LIBRARY | grep '\.epub\|\.pdf')
books=${books//$LIBRARY/"~"}
line=$(echo "$books" | rofi -matcher fuzzy -dmenu -i -p "book> ")
exit_code=$?
line="${line/\~/$LIBRARY}"
if [ $exit_code == 0 ]; then
zathura "${line}"
echo $line
fi
}
display
@rjachuthan

This comment has been minimized.

Copy link

commented Oct 14, 2019

This code runs like a charm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.