List of inactive windows optional

Create issue
Issue #38 closed
JohannesBuchner created an issue

Hi @nomeata,

great project, exactly what I wanted.

I was wondering if you could make storing the list of windows optional. So in capture, truncate the list of windows to contain only the active window. I don't need the other inactive windows. It would save a lot of disk space.

Thanks, Johannes

Comments (6)

  1. nomeata repo owner

    Great you like it!

    I am very disinclined to make the list optional, because of the conceptual overhead of adding options. They have to be implemented and document. And then there is the question of whether the data model on disk should change depending on the option, or whether to simply store an empty list. What if some part of the log was recorded with the option, and some part without? Should arbtt detect that? Warn about it?

  2. JohannesBuchner reporter

    I don't think the data model needs to be changed at all. It is sufficient if the capture "forgets" the windows that are not active and pretends they are not there. True, this would require adding a command line option (e.g. --store-active-window-only) to capture and in the code an argument to captureData, so that it filters the returned list by w == fwin or h == foreground. Actually, I think only capture-main.hs would have to be touched, by wrapping captureData.

  3. nomeata repo owner

    I am still not convinced. When some data was recorded with and some without this flag, then your statistics about them is quite broken.

    Also, the disk usage is not that large, I’d say. I have been recording since 7½ years now. 12 million records, 855 days of non-stop usage, and the file is 120MB large.

  4. JohannesBuchner reporter

    Okay, that's fine then and not too big.

    I don't see the database/statistics would be broken; A user that only uses "current window" rules would be unaffected. A user that later wants non-active window rules would be like having run only the active window; but that is clearly intended if the user chose to record with such a flag.

  5. Log in to comment