Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automate an Internet content filter' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automate an Internet content filter
Authored by: Januz on Aug 04, '13 12:39:05AM

Thank you very much for this approach!! I modified the script to

1) be run by launchd twice a day on weekdays (at the beginning of the work day, 8.01, and after lunch break, 14.01) and automatically set hard coded end times (12.30 for the first working period; 18.00 for the second)

2) be run from command line or as an Alfred workflow, with different results depending on the use of an argument
a - no argument activates SelfControl with the end times specified in 1)
b - a number (e.g., 10) as argument activates SelfControl for the number of minutes (e.g., 10 minutes)
c - a float (e.g., 15.30) is interpreted as end time, and SelfControl is activated for the number of minutes until this time (minutes from actual time until 15.30)

Note that

1) and 2a) work only in the specified working times, so from 8.00-12.30 in the morning and from 14.00-18.00 in the afternoon, i.e. if you run the script within these time ranges, SelfControl will be activated until the end of the respective period (12.30 in the morning; 18.00 in the afternoon). If you run the script outside of these time ranges, the script will do nothing.

You can find the launchd file I use and the script here:

https://gist.github.com/Januzz/6149533#file-launchd-file-for-selfcontrol
https://gist.github.com/Januzz/6149535#file-applescript-for-selfcontrol




[ Reply to This | # ]