Retain position in RSS script when selecting items
This commit is contained in:
parent
47eda92e03
commit
a60641cebc
1 changed files with 8 additions and 3 deletions
|
@ -92,13 +92,18 @@ rssreadmenu() {
|
||||||
tr -d ' '
|
tr -d ' '
|
||||||
)"
|
)"
|
||||||
|
|
||||||
|
CHOICES="$(list_items)"
|
||||||
|
DMENUIDX=1
|
||||||
while true; do
|
while true; do
|
||||||
# Show list of items
|
# Show list of items
|
||||||
PICKED=$(list_items | dmenu -p "RSS ($TIMESPANABBR)" -c -l 20 -fn Terminus-15)
|
PICKED="$(printf %b "$CHOICES" | dmenu -idx $DMENUIDX -p "RSS ($TIMESPANABBR)" -c -l 20 -fn Terminus-15)"
|
||||||
|
DMENUIDX="$(echo "$CHOICES" | grep -m1 -F -n "$PICKED" | cut -d ':' -f1)"
|
||||||
if [ "$PICKED" = "Close Menu" ]; then
|
if [ "$PICKED" = "Close Menu" ]; then
|
||||||
die Closed Menu
|
die Closed Menu
|
||||||
elif [ "$PICKED" = "Change Timespan" ]; then
|
elif [ "$PICKED" = "Change Timespan" ]; then
|
||||||
rsstimespanmenu
|
rsstimespanmenu
|
||||||
|
CHOICES="$(list_items)"
|
||||||
|
DMENUIDX=1
|
||||||
else
|
else
|
||||||
URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')"
|
URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')"
|
||||||
sxmo_urlhandler.sh "$URL" fork
|
sxmo_urlhandler.sh "$URL" fork
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue