-
-
Save maurelian/ca531751b6d7c4111dd6da9bb3ee853f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function controlSelf() { | |
eval "defaults write org.eyebeam.SelfControl BlockDuration -int $1" | |
extras="" | |
if [ "$2" = "nuke" ]; then | |
extras="inbox.google.com slack.com" | |
fi | |
blacklist="facebook.com news.ycombinator.com reddit.com twitter.com $extras" | |
eval "defaults write org.eyebeam.SelfControl HostBlacklist -array $blacklist" | |
defaults read org.eyebeam.SelfControl | |
sudo /Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl $(id -u $(whoami)) --install > /dev/null 2>&1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage:
controlSelf 60
block your basic blacklist for 60 minutescontrolSelf 60 nuke
block the basic blacklist + extras for 60 minutes