Loop reddit script and use URL handler script with fork

master
Miles Alan 4 years ago
parent 7a9ec120e1
commit 57f6e5897e
  1. 16
      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

Loading…
Cancel
Save