dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 0e2581565b1d4c02476b30c3103278df2bd400a1
parent ce84909489761437dae027bcbfdcf358495781bc
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 27 Jun 2019 14:36:18 +0200

Include books in articlesearch

Diffstat:
M.local/bin/articlesearch | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.local/bin/articlesearch b/.local/bin/articlesearch @@ -2,15 +2,15 @@ set -e browser=${BROWSER:-firefox} -dir="$HOME/articles" +dir="$HOME/articles $HOME/books" -query="$(find "$dir" -type f | sed "s|$dir/||" | dmenu_themed -i -l 10 -p "Search publications:")" || exit 1 +query="$(find $dir -type f | sed "s|$HOME/||" | dmenu_themed -i -l 10 -p "Search publications:")" || exit 1 action="$(printf "Open\nSci-Hub\nAdd citation" | dmenu_themed -i -p "Action:")" if [ "$action" = "Open" ]; then - if [ -f "$dir/$query" ]; then - xdg-open "$dir/$query" + if [ -f "$HOME/$query" ]; then + xdg-open "$HOME/$query" else $browser "https://scholar.google.com/scholar?q=$query" fi