I want to have notifications if I use certain website for some time

For example, I specify a website, like ‘reddit.com’ or ‘youtube.com’, I want it to show me a notification pane after 5 minute use. It should also be considerate that I may visit different links within reddit.com domain, this time should be counted.

I also wish to make a notification if I have visited a certain website more that 2 times within an hour. For me that would be hckrnews, perhaps even redirect the second time I visit website to some other port.

I use focus to block some websites like Facebook, Twitch permanently but I want a more practical solution for some websites so that I can visit them a limited time per some specified time.

Thank you for any help.

Hey Nikita,

You’re using what browser?


Hey Chris,

I am using Safari.

Hey Nikita,

Look at the Safari Actions and Safari Tokens.

You'll have to use a timed trigger in combination with a Focussed Window trigger.

To accomplish all you want will be quite a task, but it should be doable.


Hey Chris,

I am bit confused as to what you mean by Safari actions and tokens and how exactly I would do it. But I will try take a look at it now and see. Thank you for your response.

Hey Nikita,

I should have looked...

The Safari Control actions are out – they're all for doing things TO Safari.

To get the information you need you can get title and URL info from Safari with the following tokens using a Set Variable to Text action:



I kind of understand how to get the variables however I am not really sure what to do after that. How do I implement the timer and how do I count the number of times I have visited a certain website.

I would really appreciate any help on this. Such a macro would really be a big time saver for me.

Hey Nikita,

See if this doesn't help you get started.

What you want to do is a pretty big job.

Break it down into the smallest possible pieces and try to figure out the pieces.

Here's your basic window changes trigger:

Test Window Trigger.kmmacros (1.8 KB)

When the window changes you test to see if the new window is one you're logging.

If it is then you log the time in a format that can be mathematically added.

Then you trigger another macro that has a time trigger of say 1 minute that tests that value every minute.

If it is less then 5 then it adds a minute.

If it reaches 5 then it fires off a warning and disables itself.

Expect to spend many hours working on this problem. :smile: