swaydots

my dotfiles
git clone https://git.awy.one/swaydots.git
Log | Files | Refs | README | LICENSE

newsup (505B)


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