#!/bin/sh # Set as a cron job to check for new RSS entries for newsraft. # If newsraft is open, sends it an "R" key to refresh. export STATUSBAR="i3blocks" export XDG_RUNTIME_DIR=/run/user/1000 export WAYLAND_DISPLAY=wayland-1 pgrep -f newsraft$ && /usr/bin/wlrctl window focus title:newsraft && /usr/bin/wlrctl keyboard type R && exit echo "🔃" >/tmp/newsupdate pkill -RTMIN+6 "$STATUSBAR" /usr/bin/newsraft -e reload-all rm -f /tmp/newsupdate pkill -RTMIN+6 "$STATUSBAR"