summaryrefslogtreecommitdiff
path: root/mac/.local/bin/cron/newsup
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 13:36:06 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 13:36:06 +0900
commit6baef1437fcf40b1d51c5255af78ab297d361d2c (patch)
treec3c257e026ec3fb32b787839f81d8af0c2e6c7ce /mac/.local/bin/cron/newsup
parent07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (diff)
updates
Diffstat (limited to 'mac/.local/bin/cron/newsup')
-rwxr-xr-xmac/.local/bin/cron/newsup15
1 files changed, 15 insertions, 0 deletions
diff --git a/mac/.local/bin/cron/newsup b/mac/.local/bin/cron/newsup
new file mode 100755
index 0000000..346ec75
--- /dev/null
+++ b/mac/.local/bin/cron/newsup
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Set as a cron job to check for new RSS entries for newsboat.
+# If newsboat is open, sends it an "R" key to refresh.
+
+/usr/bin/notify-send "📰 Updating RSS feeds..."
+
+pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit
+
+echo 🔃 >/tmp/newsupdate
+pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}"
+/usr/bin/newsboat -x reload
+rm -f /tmp/newsupdate
+pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}"
+/usr/bin/notify-send "📰 RSS feed update complete."