seanbreckenridge / HPI

Human Programming Interface - a way to unify, access and interact with all of my personal data [my modules]
https://beepb00p.xyz/hpi.html
MIT License
72 stars 6 forks source link

improve window_watcher event structure #2

Closed seanbreckenridge closed 3 years ago

seanbreckenridge commented 3 years ago

while parsing, maintain a 'recent' cache, removing items when they haven't had an event for 2 hours

each item would look like:

# represents one history entry
class Entry(NamedTuple):
    times: Tuple[datetime, timedelta]
    application: str
    window_title: str

add some @property wrappers to serialize the start/end times