summaryrefslogtreecommitdiffstats
path: root/.local/bin/fetch_sfeed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/fetch_sfeed18
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/fetch_sfeed b/.local/bin/fetch_sfeed
new file mode 100755
index 0000000..3588ea2
--- /dev/null
+++ b/.local/bin/fetch_sfeed
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+pre=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
+ tail -n1 |
+ rev |
+ cut -b 7- |
+ rev |
+ tr -d ' ')
+sfeed_update $XDG_CONFIG_HOME/sfeed/sfeedrc
+post=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
+ tail -n1 |
+ rev |
+ cut -b 7- |
+ rev |
+ tr -d ' ')
+if [ $post -gt $pre ]; then
+ exec herbe "[rss] $((post-pre)) new articles" &
+fi