summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-06 11:54:08 +0200
committerjoe <rbo@gmx.us>2025-10-06 11:54:08 +0200
commitd6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb (patch)
treed2a9469dd3483f5809384aa48f1b475b836aeda9
parentup (diff)
downloaddotfiles-bsd-d6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb.tar.gz
dotfiles-bsd-d6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb.tar.bz2
dotfiles-bsd-d6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb.tar.xz
dotfiles-bsd-d6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb.tar.zst
dotfiles-bsd-d6b2a6078a10baf3cf0c1000fdb4091e29fcfcfb.zip
up
-rw-r--r--.config/zsh/alias.zsh1
-rwxr-xr-x.local/bin/fetch_sfeed14
-rwxr-xr-x.local/bin/sf3
3 files changed, 15 insertions, 3 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index 1fbb0c8..6e8bfea 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -61,7 +61,6 @@ alias \
irc='TERM=st-16color catgirl' \
free='freecolor' \
n='nnn' \
- sf='sfeed_curses $XDG_DATA_HOME/sfeed/feeds/*' \
gt='gpg-tui' \
lg='lazygit' \
tf='terraform' \
diff --git a/.local/bin/fetch_sfeed b/.local/bin/fetch_sfeed
index b89db72..08e6e41 100755
--- a/.local/bin/fetch_sfeed
+++ b/.local/bin/fetch_sfeed
@@ -1,8 +1,18 @@
#!/bin/sh
-pre=$(wc -l --total=only $XDG_DATA_HOME/sfeed/feeds/*)
+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 --total=only $XDG_DATA_HOME/sfeed/feeds/*)
+post=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
+ tail -n1 |
+ rev |
+ cut -b 7- |
+ rev |
+ tr -d ' ')
if [ $post -gt $pre ]; then
exec herbe " $((post-pre)) new articles" &
fi
diff --git a/.local/bin/sf b/.local/bin/sf
new file mode 100755
index 0000000..89c9848
--- /dev/null
+++ b/.local/bin/sf
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sfeed_curses $XDG_DATA_HOME/sfeed/feeds/*