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 5297dda62baf7ddc0ab527d1e3b8a7a219381c56
parent 6f9b40de0aadea291340ffba473c1f013b2b96a6
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 27 Sep 2019 15:40:33 +0200

Use nohup and optionally disown instead of setsid

Diffstat:
M.config/sh/commands | 5+++--
M.local/bin/fuzzylaunch | 2+-
M.local/bin/linkhandler | 2+-
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.config/sh/commands b/.config/sh/commands @@ -31,7 +31,7 @@ alias r='fc -s' o() { [ "$(uname)" = 'Darwin' ] && open="open" || open="xdg-open" if [ "$#" -gt 0 ] && [ -f "$1" ]; then - setsid $open "$1" >/dev/null 2>&1 + nohup $open "$1" >/dev/null 2>&1 & else IFS= out=$(fzf --exit-0 \ --expect=ctrl-o,ctrl-e,ctrl-y \ @@ -46,7 +46,8 @@ o() { elif [ "$key" = ctrl-o ]; then cd "$(dirname "$file")" || return else - setsid $open "$file" >/dev/null 2>&1 + nohup $open "$file" >/dev/null 2>&1 & + disown fi fi fi diff --git a/.local/bin/fuzzylaunch b/.local/bin/fuzzylaunch @@ -12,7 +12,7 @@ if [ -n "$file" ]; then if [ "$key" = ctrl-e ]; then nohup "$TERMINAL" -e "$EDITOR" "$file" >/dev/null 2>&1 & elif [ "$key" = ctrl-o ]; then - cd "$(dirname "$file")" && setsid "$TERMINAL" >/dev/null 2>&1 + cd "$(dirname "$file")" && nohup "$TERMINAL" >/dev/null 2>&1 & else nohup "$open" "$file" >/dev/null 2>&1 & fi diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler @@ -51,7 +51,7 @@ for url in "$@"; do f="$(curl -s --write-out "%{filename_effective}\n" -OL "$url")" nohup xdg-open "$f" >/dev/null 2>&1 & ;; "youtube-dl") - echo "youtube-dl -f 'best[height<=1080+bestaudio]' '$url' >/dev/null" | at now;; + echo "youtube-dl -f 'best[height<=1080]+bestaudio' '$url' >/dev/null" | at now;; "youtube-dl-music") nohup $TERMINAL -e youtube-dl-music "$url" >/dev/null 2>&1 & ;; *)