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 aa4df74ea41240f27cbe0a8630fe5c89a81ce670
parent d49034431baf7c3137a8610385e415438698db54
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 26 Sep 2019 18:20:36 +0200

Use 'at' instead of task spooler

Diffstat:
M.local/bin/linkhandler | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler @@ -23,37 +23,37 @@ for url in "$@"; do case "$action" in "open") - setsid xdg-open "$url" >/dev/null 2>&1 & ;; + nohup xdg-open "$url" >/dev/null 2>&1 & ;; "open (tbb)") - setsid tor-browser "$url" >/dev/null 2>&1 & ;; + nohup tor-browser "$url" >/dev/null 2>&1 & ;; "xclip") printf "%s" "$url" | xclip ;; "bookmark") description="$(echo "$(date), $hostname" | \ dmenu -p "description:")" - setsid $TERMINAL bookmark "$url" "$description" & ;; + nohup $TERMINAL bookmark "$url" "$description" >/dev/null 2>&1 & ;; "comic") - setsid comic "$url" >/dev/null 2>&1 & ;; + nohup comic "$url" >/dev/null 2>&1 & ;; "curl") - setsid tsp curl -LO "$url" >/dev/null 2>&1 & ;; + echo "curl -LO '$url' >/dev/null" | at now;; "html to pdf") out="$HOME/tmp/html_to_pdf_$(date +'%F-%T')".pdf && \ wkhtmltopdf "$url" "$out" && \ notify-send "$(basename $out) complete" ;; "sci-hub") - setsid tsp shdl --tor-socks --notify --open --reference \ - "$url" >/dev/null 2>&1 & ;; + echo "shdl --tor-socks --notify --open --reference '$url' >/dev/null" \ + | at now;; "add bibref") - getdoi "$url" | getref --notify >> "$BIB" & ;; + echo "getdoi '$url' | getref --notify >> '$BIB'" | at now;; "mpv") - setsid mpv -quiet "$url" >/dev/null 2>&1 & ;; + nohup mpv -quiet "$url" >/dev/null 2>&1 & ;; "xdg-open") f="$(curl -s --write-out "%{filename_effective}\n" -OL "$url")" - xdg-open "$f" ;; + nohup xdg-open "$f" >/dev/null 2>&1 & ;; "youtube-dl") - setsid tsp youtube-dl "$url" >/dev/null 2>&1 & ;; + echo "youtube-dl '$url' >/dev/null" | at now;; "youtube-dl-music") - setsid $TERMINAL -e youtube-dl-music "$url" & ;; + nohup $TERMINAL -e youtube-dl-music "$url" >/dev/null 2>&1 & ;; *) notify-send "${0##/*}" "Error: Action not understood" exit 1 ;;