fix: event-trigger status reported rules: 0

eventer_status counted RULES but never populated it (eventer_read_rules
was only called by run/config), so status always said 'rules: 0' even
with rules present. Call eventer_read_rules before counting.
This commit is contained in:
Your Name
2026-08-09 18:00:15 +00:00
parent dfb0f6d82d
commit 3ae18499ad
+1
View File
@@ -301,6 +301,7 @@ eventer_disable() {
eventer_status() {
if [ -f "$USER_SYSTEMD_DIR/$EVENT_UNIT.timer" ] && systemctl --user show-environment >/dev/null 2>&1 \
&& systemctl --user is-enabled "$EVENT_UNIT.timer" >/dev/null 2>&1; then
eventer_read_rules
local oncal next
oncal="$(sed -n 's/^OnCalendar=//p' "$USER_SYSTEMD_DIR/$EVENT_UNIT.timer")"
next="$(systemctl --user list-timers "$EVENT_UNIT.timer" --no-legend 2>/dev/null | awk '{print $1, $2}' | head -1)"