Add 'newsup' cron script
This commit is contained in:
parent
b7804d5245
commit
452db41b36
15
.local/bin/cron/newsup
Executable file
15
.local/bin/cron/newsup
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
ping -q -c 1 1.1.1.1 > /dev/null || exit 1
|
||||
|
||||
ps ax | grep -q newsboat$ && \
|
||||
/usr/bin/xdotool key --window \
|
||||
"$(/usr/bin/xdotool search --name newsboat)" R && exit
|
||||
|
||||
echo " " > /tmp/newsupdate
|
||||
refbar &
|
||||
/usr/bin/newsboat -x reload
|
||||
rm -f /tmp/newsupdate
|
||||
refbar &
|
||||
|
||||
newsboat -x print-unread | awk '{ print $1 }' > "$HOME/.cache/news_unread"
|
Loading…
x
Reference in New Issue
Block a user