From 29fceab6136a13c9c9997dd65324439905bcc8bf Mon Sep 17 00:00:00 2001 From: VikingKong Date: Thu, 15 Dec 2022 20:11:59 +0300 Subject: [PATCH] Suppress writing to nohup.out when invoking external apps. --- App.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/App.py b/App.py index 4915712..ba0b45a 100644 --- a/App.py +++ b/App.py @@ -221,10 +221,13 @@ class Links(urwid.ListBox): def parseLink(self, link): ext = link.split(".")[-1] if ext.lower() in ("jpg", "jpeg", "gif", "png", "tif", "tiff"): - os.system('nohup feh ' + link + ' 2>/dev/null &') + os.system('nohup feh ' + link + ' /dev/null 2>&1 &') elif Utils.checkStreamingVideo(link): tui.destroyOverlay() - os.system('nohup mpv --ytdl-format="bestvideo[height<=720]+bestaudio/best[height<=720]" "' + link + '" 2>/dev/null &') + os.system( + 'nohup mpv --ytdl-format="bestvideo[height<=720]+bestaudio/best[height<=720]" "' + + link + + '" /dev/null 2>&1 &') else: subprocess.Popen(['firefox', '-new-tab', link])