From c0d88e338a5b242b07c5bf43f4cf05ff53c293b2 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 May 2020 21:42:01 +0200 Subject: [PATCH] [bibtex] Fix rofi-bib-due display options Fixed displaying urgent and non-urgent items. Fixed passing along of date filters and other options. Fixed using correct library pdf directory (still hardcoded to pdf subdirectory of $BIBFILE). --- bibtex/.local/bin/rofi-bib-due | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bibtex/.local/bin/rofi-bib-due b/bibtex/.local/bin/rofi-bib-due index 623a92d..2577832 100755 --- a/bibtex/.local/bin/rofi-bib-due +++ b/bibtex/.local/bin/rofi-bib-due @@ -3,13 +3,11 @@ exist rofi normal _rofi() { - rofi -dmenu -no-auto-select -i "$@" -theme themes/dropdown -p "papers" -l 25 -yoffset 20 + rofi -dmenu -no-auto-select -i -theme themes/dropdown -p "papers" -l 25 -yoffset 20 -columns 1 -u "$urgent" } -bib=${1:-$BIBFILE} - # call for whatever file is passed in -results="$(bib-due "$1")" +results="$(bib-due "$@")" # mark priority 1 items as urgent in rofi urgent="$( @@ -19,13 +17,13 @@ urgent="$( )" # get user choice, exit if nothing selected -choice=$(echo "$results" | _rofi -u "$urgent" -columns 1) +choice=$(echo "$results" | _rofi) [ -z "$choice" ] && exit 0 key=$(echo "$choice" | sed -E 's/.*\((\w+)\)$/\1/') # get library pdf folder (only searches for default ./pdf path) -library="$(dirname "$(realpath "$bib")")/pdf" +library="$(dirname "$(realpath "$BIBFILE")")/pdf" # find and open the key-associated pdf file ${FILEREADER:-xdg-open} "$(find "$library" -type f -name "$key *.pdf")"