dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: ab307792a3e70aa8af6098a26291b2d18e0d4a45
Parent: 754b39ae61a98660b4993a91f804ad87d46fe33c
Author: Randy Palamar
Date:   Sun, 14 May 2023 09:53:35 -0600

add sfeed_dmenu script for selecting new RSS feeds

Diffstat:
Abin/sfeed_dmenu | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/bin/sfeed_dmenu b/bin/sfeed_dmenu @@ -0,0 +1,30 @@ +#!/bin/sh + +# presents a list of unread feed entries using dmenu +# prints selected entry to stdout and marks it as read + +configdir=~/.config/sfeed + +usage() +{ + echo "usage: $(basename $0) feedname [...]" + exit 1 +} + +[ ${#} -lt 1 ] && usage + +unread() +{ + sfeed_unread "$SFEED_URL_FILE" $@ +} + +for arg; do + . $configdir/${arg}.sh + [ -d "$sfeedpath" ] || continue + list="$(unread "$sfeedpath/*")\n$list" +done + +url=$(echo "$list" | dmenu -l 15 | cut -f 3) +[ -n "$url" ] || exit 0 +echo "$url" | sfeed_markread read +echo "$url"