From aa434f25381ae6236afd3273df8238eadc80b32b Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:44:33 +0900 Subject: modified cron/newsup, modified statusbar/sb-news --- ar/.local/bin/cron/newsup | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ar/.local/bin/cron/newsup') diff --git a/ar/.local/bin/cron/newsup b/ar/.local/bin/cron/newsup index 4d387eb..f8e3181 100755 --- a/ar/.local/bin/cron/newsup +++ b/ar/.local/bin/cron/newsup @@ -3,9 +3,15 @@ # Set as a cron job to check for new RSS entries for newsboat. # If newsboat is open, sends it an "R" key to refresh. +# Bail if a previous run is still going. With the fulltext filter a reload now +# takes ~17s+, so back-to-back cron ticks could overlap: a second `-x reload` +# can't grab the cache.db lock, and the rm/signal races blank the status bar. +exec 9>/tmp/newsup.lock +flock -n 9 || exit + /usr/bin/notify-send "📰 Updating RSS feeds..." -pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit +pgrep -x newsboat && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit echo "📰$(/usr/bin/newsboat -x print-unread | awk '{print $1}')🔃" >/tmp/newsupdate pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" -- cgit v1.2.3