From 57f6e5897e1dfb701d9f11eaf9acb0bd451abe25 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Thu, 9 Jul 2020 18:26:10 -0500 Subject: [PATCH] Loop reddit script and use URL handler script with fork --- scripts/appscripts/sxmo_reddit.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/appscripts/sxmo_reddit.sh b/scripts/appscripts/sxmo_reddit.sh index 752740b..cc06ddc 100755 --- a/scripts/appscripts/sxmo_reddit.sh +++ b/scripts/appscripts/sxmo_reddit.sh @@ -21,15 +21,17 @@ menu() { awk -F'\t' '{ printf "↑%4s", $3; print " " $4 " " $1 " " $2 }' )" - RESULT="$( - printf %b "Close Menu\n$REDDITRESULTS" | - dmenu -c -l 10 -fn Terminus-20 - )" + while true; do + RESULT="$( + printf %b "Close Menu\n$REDDITRESULTS" | + dmenu -c -l 10 -fn Terminus-20 + )" - [ "Close Menu" = "$RESULT" ] && exit 0 - URL=$(echo "$RESULT" | awk -F " " '{print $NF}') + [ "Close Menu" = "$RESULT" ] && exit 0 + URL=$(echo "$RESULT" | awk -F " " '{print $NF}') - $BROWSER "$URL" + sxmo_urlhandler.sh "$URL" fork + done } menu