Commit: d8998ff2d5dc93322ef928b32010ff3246b348da Parent: 3018531cbd83cb5acddf3864886c8decd6f0dad0 Author: Randy Palamar Date: Sun, 28 Mar 2021 17:31:17 -0600 use notify script for rss notifications this script uses herbe but can easily be modified to use anything Diffstat:
| M | .config/cron/rssup.sh | | | 2 | +- |
| A | bin/notify | | | 17 | +++++++++++++++++ |
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.config/cron/rssup.sh b/.config/cron/rssup.sh @@ -27,7 +27,7 @@ html() { compare() { cmp -s $tmp $configdir/html/${1}.html || ( mv $tmp $configdir/html/${1}.html && - notify-send "New RSS Entries: ${1}" + notify -c "browser $configdir/html/${1}.html" 'New RSS Entries: '"${1}" ) } diff --git a/bin/notify b/bin/notify @@ -0,0 +1,17 @@ +#!/bin/sh + +usage() { + echo "${0##*/}" '[-c "command"] "Line 1" "Line 2" ...' + exit 1 +} + +[ ${#} -lt 1 ] && usage + +command="true" + +if [ "$1" = '-c' ]; then + command="$2" + shift 2; +fi + +herbe "$@" && $command &