From 95e36ccec279511340f363b2cf5d91909f43f970 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Thu, 9 Jul 2020 18:17:59 -0500 Subject: [PATCH] Loop RSS script so that you can launch multiple items without reopening --- scripts/appscripts/sxmo_rss.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/appscripts/sxmo_rss.sh b/scripts/appscripts/sxmo_rss.sh index 9276be0..881c19c 100755 --- a/scripts/appscripts/sxmo_rss.sh +++ b/scripts/appscripts/sxmo_rss.sh @@ -32,6 +32,7 @@ prep_temp_folder_with_items() { list_items() { cd "$FOLDER" || die "Couldn't cd to $FOLDER" + echo "Close Menu" gawk -F'\t' '{print $1 " " substr(FILENAME, 3) " | " $2 ": " $3}' ./* |\ grep -E '^[0-9]{5}' |\ sort -nk1 |\ @@ -56,9 +57,13 @@ echo "1 hour ago FOLDER="/tmp/sfeed_$(echo "$TIMESPAN" | sed 's/ /_/g')" prep_temp_folder_with_items -# Show list of items -PICKED=$(list_items | dmenu -p "RSS" -c -l 20 -fn Terminus-15) +while true; do + # Show list of items + PICKED=$(list_items | dmenu -p "RSS" -c -l 20 -fn Terminus-15) -# Handle picked item -URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')" -sxmo_urlhandler.sh "$URL" + [ "$PICKED" = "Close Menu" ] && die Closed Menu + + # Handle picked item + URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')" + sxmo_urlhandler.sh "$URL" +done