Excluding specific apps from time limits

Asked by mark

I would like to accomplish the following:

Screen time for two kids' acounts is limited to 1h. With one exception: if they want to use an educational app (e.g. Klavaro or TuxMath), then that time is free and should not count towards the 1h.

I was hoping it might work by given the user 24h of PlayTime for the educational apps only and setting PlayTime override to true, but when I test that, it still seems that the regular time limit is applied first, given me no playtime beyond the regular.

I also tried same without the override setting, but then it also seems PlayTime is accounted as part of the overall limits.

So what I need is kind of the reverse of PlayTime, which I understand to be about limiting specific apps. Kids are free to do whatever they want during normal time (I don't want to specify specific processes for that), but I want to allow specific processes/apps to be able to be used even outside that time.

Is there a way to do this? Am I overlooking something?

Question information

Language:
English Edit question
Status:
Answered
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said (last edit ):
#1

This is impossible to accomplish currently and quite problematic in general.

So, what I understand you need is that user can use certain apps no matter the settings. This is quite impossible to achieve in general.

Let's take a simple example when there is time limit imposed on user (say 1h limit and it is not spent yet). If you allow only certain app, say TuxMath, time accounting will stop which is what you want, but what happens when user minimizes TuxMath and starts up Counter Strike or youtube? He effectively will play games however long he wants.

Another example, let's say time limit is already spent, he wants to log in and use TuxMath. The intent is nice and clear, but timekpr has no way to determine his intention. When time is over (which it is already), timekpr will kill user sessions right upon the login. This is because user will not be able to start up TuxMath fast enough for timekpr to determine that TuxMath is running.

Maybe I did not quite understood what you wanted, if so, please clarify the idea.

Revision history for this message
mark (pi400user) said :
#2

Yes good thinking. My kids are young enough to not think of your example #1 YET. Haha!

But your example #2 (how to reach an app in the first place if overall time is up) is a problem I ran into already.

So, a follow-up question that may turn into a feature request: Timekpr tracks only whether a process runs. Not whether it is focused. Now, from oneko I know that an app can at least know which window is in focus (try oneko -tofocus). Might it be possible and feasible to track the time a specific application is in focus?

If so, then I could imagine a mode in which certain applications , when in focus, do not contribute to time accounting. So by keeping that application in focus you would be extending your available time. This is what I first thought PlayTime + override would do: override the general timekeeping. Perhaps I am proposing a new PlayTime mode: BonusTime.

But I am starting to think maybe I am better off creating separate user accounts in whose profile I only allow the running of one or a few apps (through other means than Timekpr) and giving those accounts unlimited time.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#3

TL;DR not possible currently and will not be implemented in foreseeable future.

The idea with PlayTime was rather simple, one has some allowance (intervals and limit) and within that allowance one can play games or whatever which are restricted to some additional amount, that is for normal mode.
The override is that do whatever you want in within your limits (intervals) unless you start up "that", then you have a countdown for limit.

You request does not fit in any of that :( Tracking focused app, that's a tricky one, because on X11 there is a property which process created that window, but it maybe wrong or misleading and on wayland, not sure I can do that at all, but I haven't checked.

Can you help with this problem?

Provide an answer of your own, or ask mark for more information if necessary.

To post a message you must log in.