swaydots

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

newsup (575B)


      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 export XDG_RUNTIME_DIR=/run/user/1000
      7 export WAYLAND_DISPLAY=wayland-1
      8 
      9 /usr/bin/notify-send "📰 Updating RSS feeds..."
     10 
     11 pgrep -f newsboat$ && /usr/bin/wlrctl window focus title:newsboat && /usr/bin/wlrctl keyboard type R && exit
     12 
     13 echo 🔃 > /tmp/newsupdate
     14 pkill -RTMIN+6 "${STATUSBAR:-i3blocks}"
     15 /usr/bin/newsboat -x reload
     16 rm -f /tmp/newsupdate
     17 pkill -RTMIN+6 "${STATUSBAR:-i3blocks}"
     18 /usr/bin/notify-send "📰 RSS feed update complete."