Perform a system action when given conditions are met

Feature:
An array where user sees: Action to trigger, Period, and Conditions.

Action can actually be just a command line to execute, if ActivityWatch doesn’t want to integrate specific actions.

Period - whether can be hourly, daily, weekly, monthly, or unbound. Basically means when the count for meeting conditions is re-started, regardless whether any conditions were met or not.

Conditions - these should be selected either as “all have to be met (AND)” or “at least one needs to be met (OR)”. More complex logical merging shouldn’t be required.

What a single condition can be, could be expanded as development progresses. Some starting ideas would be “User not active for over N minutes in total” or “User active for over N minutes in total”, “APP active for over N minutes in total” “APP active for over N consecutive minutes”.

Use case:
While this could be used for many things, my specific idea is - I want to play audio queue when user actively uses the computer for over 5 hours per day, playing a different clip each time another hour passes (the clip will contain some speeches which I will record; or I may just execute text-to-speech command.

Semi-related request: