santa icon indicating copy to clipboard operation
santa copied to clipboard

Allow to prevent rule removal for a specified time range

Open imkaihao opened this issue 6 months ago • 5 comments

I use Santa in monitor mode to block distracting apps locally (without a sync server). However, it's easy to bypass the block by simply removing the rule.

Adding an option to lock rules for a specific duration would significantly improve self-control.

For example, at time t1, if we run:

sudo santactl rule --block --path /Applications/Example.app --duration Δt1

The rule cannot be removed until t2 (t2 = t1 + Δt1).

If, at time t3, we run again:

sudo santactl rule --block --path /Applications/Example.app --duration Δt2

If t4 (t4 = t3 + Δt2) is later than t2, the rule's expiration time updates to t4, preventing removal until then. Otherwise, the expiration time remains unchanged.

imkaihao avatar Aug 12 '24 02:08 imkaihao