dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

newsup (544B)


      1 #!/usr/bin/env sh
      2 # Set as a cron job to check for new RSS entries for newsboat.
      3 # If newsboat is open, sends it an "R" key to refresh.
      4 
      5 ping -q -c 1 1.1.1.1 > /dev/null || exit
      6 
      7 /usr/bin/notify-send "📰 Updating RSS feeds..."
      8 
      9 pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
     10 
     11 echo 🔃 > /tmp/newsupdate
     12 pkill -RTMIN+6 "${STATUSBAR:?}"
     13 /usr/bin/newsboat -x reload
     14 rm -f /tmp/newsupdate
     15 pkill -RTMIN+6 "${STATUSBAR:?}"
     16 /usr/bin/notify-send "📰 RSS feed update complete."