Rewrite the event system (used by `settimed`)
xyproto opened this issue · 4 comments
xyproto commented
- The event system should be refactored out from both
gnometimed
andsimpletimed
. - When using
settimed
, the transition over midnight (23:59 to 00:00) is not handled correctly. - The length of the cross-fade transitions are not always handled correctly (results in messages like
Triggered transition event at 13:20 (277% complete)
). - Perhaps someone have already written a great even system in Go? I considered using something like
cron
or thesystemd
trigger system instead, but I think it would be nice if everything that has t o do with events was contained within a module that could be used by thesettimed
application. - Under
sway
, sometimes multiple events are triggered in rapid succession, which is not correct.
xyproto commented
I created a new event system.
Using this package instead will hopefully fix the current issues.
eddsalkield commented
I found gocron, an event scheduler, which might help. It's forked from a repo with 2k stars after the previous developer stopped maintaining it, and seems more flexible than event2
.
xyproto commented
Thanks! I will consider using it. event2
was written especially with settimed
in mind, with as little complexity (and flexibility) as possible, just as much as is needed. If that doesn't work out, I'll probably use gocron
instead.
xyproto commented
I have rewritten the event system and updated the settimed
command.