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 5e1ecf0aba98663cca73f249ff05012fe16675ea
parent 246256c23e9af2debb506ac4735314d12f4cbd90
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  9 Aug 2019 13:02:01 +0200

Better handling of output file placement

Diffstat:
M.local/bin/linkhandler | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler @@ -1,4 +1,6 @@ #!/bin/sh +mkdir -p ~/tmp +cd ~/tmp || exit 42 for url in "$@"; do case "$url" in @@ -24,11 +26,8 @@ for url in "$@"; do dmenu_themed -p "description:")" setsid $TERMINAL bookmark "$url" "$description" & ;; "curl") - mkdir -p ~/tmp/ - cd ~/tmp/ || exit 1 setsid tsp curl -LO "$url" >/dev/null 2>&1 & ;; "html to pdf") - mkdir -p ~/tmp/ out="$HOME/tmp/html_to_pdf_$(date +'%F-%T')".pdf && \ wkhtmltopdf "$url" "$out" && \ notify-send "$(basename $out) complete" ;;