SelfControlApp / selfcontrol

:skull: Mac app to block your own access to distracting websites etc for a predetermined period of time. It can not be undone by the app or by a restart – you must wait for the timer to run out.
http://selfcontrolapp.com
GNU General Public License v3.0
4.04k stars 399 forks source link

Run Parallel Blockers #336

Open hioarns opened 8 years ago

hioarns commented 8 years ago

I have three lists. The first list I want to block for ~3 months at a time, the second I want to block for 6 days and the last for 10 hours. Is this possible?

Thanks!

cstigler commented 8 years ago

It would be nice, but currently is not possible.

hioarns commented 8 years ago

Do you think it'll be easy to implement? As in, learn Obj-c and dedicate a weekend to it easy :D ?

cstigler commented 8 years ago

@tsmffh I wish I could say yes, but probably not. It's not a trivial change - it requires serious architectural change to the app, not to mention the interface implications of all of this (we can't do anything that complicates the app for the most common use-case, which is a single block). But if you do end up figuring it out, please send a pull request!

colasbd commented 8 years ago

+1 This would be a cool feature.

chrisidefix commented 8 years ago

It's a good idea and with a little scripting effort you can already do something very similar to your request without having to change SelfControl at all. Check out issue #297 regarding scheduling and maybe look at this related project: https://github.com/andreasgrill/auto-selfcontrol

What you have to do is write a script that will manage the three block lists for you and activates the correct ones you need at any given time, then launch self control for the largest required time span. I admit it's not the exact same thing and less flexible, but from what it sounds like you probably have a pretty regular schedule in mind, right? Something like 8am-6pm block Facebook, Mon-Sat also block youtube, Jan-Mar also block tinder ;) ? Configuring this sort of schedule in a script also has the added advantage that you can't (easily) delay the activation of SelfControl. It obviously has the disadvantage that you have to rely on the script being executed to keep SelfControl running :/ but then again - you have to rely upon yourself to start SelfControl as well - so it's pretty similar.

If you don't have a super regular schedule in mind and you need or want a bit more flexibility, you could still do it without changing SelfControl, but you need a simple UI solution for your script (unless you want to do everything through the terminal). BitBar seems like the perfect solution here. In fact build on top of that scheduling script and existing terminal launch support, you could write a very nice wrapper around SelfControl this way without too much effort.