From 202ced921ca39105349d26ae775cc296abde7d8d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 27 Jun 2018 10:11:55 -0400 Subject: [PATCH] spawned windows now independent --- .config/newsboat/config | 5 +++-- .scripts/dmenuhandler | 4 ++-- .scripts/linkhandler | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.config/newsboat/config b/.config/newsboat/config index 2ef689b..790014f 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -30,8 +30,9 @@ color article cyan default browser linkhandler macro , open-in-browser -macro v set browser "i3 exec mpv"; open-in-browser ; set browser linkhandler -macro y set browser "spawndl"; open-in-browser ; set browser linkhandler +macro t set browser "tsp youtube-dl"; open-in-browser ; set browser linkhandler +macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler +macro y set browser "setsid nohup spawndl"; open-in-browser ; set browser linkhandler macro w set browser "w3m"; open-in-browser ; set browser linkhandler macro p set browser "dmenuhandler"; open-in-browser ; set browser linkhandler # c copies the link to the clipboard. diff --git a/.scripts/dmenuhandler b/.scripts/dmenuhandler index 227ef04..bc126b0 100755 --- a/.scripts/dmenuhandler +++ b/.scripts/dmenuhandler @@ -16,8 +16,8 @@ case "$x" in mpv) mpv -quiet "$1" 2&>/dev/null & disown ;; "mpv (loop)") mpv -quiet --loop "$1" 2&>/dev/null & disown ;; wget) wget "$1" 2&>/dev/null & disown ;; - browser) $BROWSER "$1" 2&>/dev/null & disown ;; + browser) setsid nohup $BROWSER "$1" & disown ;; feh) feh "$1" 2&>/dev/null & disown ;; w3m) w3m "$1" 2&>/dev/null & disown ;; - "mpv (float)") mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" /dev/video0 "$1" 2&>/dev/null & disown ;; + "mpv (float)") mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" 2&>/dev/null & disown ;; esac diff --git a/.scripts/linkhandler b/.scripts/linkhandler index 0e9e4d8..20b1bd3 100755 --- a/.scripts/linkhandler +++ b/.scripts/linkhandler @@ -17,13 +17,13 @@ fehFiles="png jpg jpeg jpe" wgetFiles="mp3 flac opus mp3?source=feed pdf" if echo $fehFiles | grep -w $ext > /dev/null; then - feh "$1" >/dev/null & disown + setsid nohup feh "$1" >/dev/null & disown elif echo $mpvFiles | grep -w $ext > /dev/null; then - mpv -quiet "$1" > /dev/null & disown + setsid nohup mpv -quiet "$1" > /dev/null & disown elif echo $wgetFiles | grep -w $ext > /dev/null; then wget "$1" >/dev/null & disown elif echo "$@" | grep "$vidsites">/dev/null; then - mpv -quiet "$1" > /dev/null & disown + setsid nohup mpv -quiet "$1" > /dev/null & disown else - $BROWSER "$1" 2>/dev/null & disown + setsid nohup $BROWSER "$1" 2>/dev/null & disown fi