andreasgrill / auto-selfcontrol

Small utility to schedule start and stop times of SelfControl
MIT License
306 stars 37 forks source link

Multiple blacklists? #14

Closed adamzerner closed 7 years ago

adamzerner commented 7 years ago

I'd like to have:

Is there a way to do that?

andreasgrill commented 7 years ago

Yes, this is already implemented.

Please keep in mind this is an experimental feature. There is a good chance that it is buggy at the moment.

You just need to add the "host-blacklist" settings to the specific schedules:


    "username": "MY_USERNAME",
    "selfcontrol-path": "/Applications/SelfControl.app",
    "host-blacklist": [
    ],
    "block-schedules":[
        {
            "start-hour": 9,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "host-blacklist": [
              "twitter.com",
              "reddit.com"
            ]
        },
        {
            "start-hour": 20,
            "start-minute": 0,
            "end-hour": 22,
            "end-minute": 0,
            "host-blacklist": [
              "reddit.com",
              "facebook.com"
            ]
        }
    ]
}```