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 af300ae998b30d3e1312f315aeae131844958540
parent 2e02b0a59df72b6dd1cbbb8f8b6e1707e5c9a073
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 12 Apr 2019 11:53:35 +0200

Add desktop notification if download fails

Diffstat:
Mbin/shdl | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/shdl b/bin/shdl @@ -62,12 +62,13 @@ function shdl_fetch { --write-out "filename: %{filename_effective}\n" -O -L -J "$pdfurl" |\ grep 'filename: ' | cut -d' ' -f2)"; then if [ "$verbose" = 1 ]; then + [ "$notify" = 1 ] && notify-send "Error: could not fetch $doi" (echo "Error: could not fetch $doi PDF from $pdfurl" >&2) fi browser_open "$shurl" else echo "saved to $file" - [ "$open" ] && xdg-open "$file" + [ "$open" = 1 ] && xdg-open "$file" fi }