aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/cron/newsup
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/cron/newsup')
-rwxr-xr-x.local/bin/cron/newsup4
1 files changed, 3 insertions, 1 deletions
diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup
index af2dbb8..05f817c 100755
--- a/.local/bin/cron/newsup
+++ b/.local/bin/cron/newsup
@@ -2,7 +2,9 @@
# Set as a cron job to check for new RSS entries for newsboat.
# If newsboat is open, sends it an "R" key to refresh.
-export DISPLAY=':0'
+pid=$(pgrep Hyprland)
+var="DBUS_SESSION_BUS_ADDRESS"
+export DBUS_SESSION_BUS_ADDRESS=$(egrep -z "$var" "/proc/$pid/environ" | sed 's/DBUS_SESSION_BUS_ADDRESS=//')
/usr/bin/notify-send "📰 Updating RSS feeds..."