aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/cron/newsup
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-01-31 22:12:51 +0300
committerawy <awy@awy.one>2025-01-31 22:12:51 +0300
commitb7175c617a6771405ef45c83c75a2ca5e567e4b5 (patch)
treeec4351dcd2272181841a188de96c084486dcd178 /.local/bin/cron/newsup
parent855a7d04f6e50d997fdf45da899b883917d413a2 (diff)
cron notifications fix
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..."