Loop RSS script so that you can launch multiple items without reopening

master
Miles Alan 4 years ago
parent e0067998c8
commit 95e36ccec2
  1. 5
      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
while true; do
# Show list of items
PICKED=$(list_items | dmenu -p "RSS" -c -l 20 -fn Terminus-15)
[ "$PICKED" = "Close Menu" ] && die Closed Menu
# Handle picked item
URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')"
sxmo_urlhandler.sh "$URL"
done

Loading…
Cancel
Save