scripts

random assortment of scripts
git clone git://git.andersuno.nu/scripts.git
Log | Files | Refs

newsboatreload.sh (355B)


      1 #!/bin/sh
      2 
      3 #ENV variable for my notify-send when ran as cronjob
      4 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
      5 
      6 ping -c 1 google.com >/dev/null || exit
      7 
      8 result=$(newsboat -x reload print-unread)
      9 
     10 #Log entries when ran as cronjob
     11 echo "Reloading Newsboat"
     12 echo "$result"
     13 
     14 [ "$result" != "" ] && notify-send -u low -i rss "Newsboat" "$result"