Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SelfControl Terminal Shortcuts
# Add these lines to ~/.bash_profile or ~/.zshrc:
# SelfControl
alias sc-read="defaults read org.eyebeam.SelfControl"
alias sc-run="sudo /Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl $(id -u $(whoami)) --install"
alias sc-check="sudo /Library/PrivilegedHelperTools/org.eyebeam.SelfControl $(id -u $(whoami)) --checkup"
sc-set()
{
if [ "$1" = "" ]; then
echo "Please provide a valid input"
else
defaults write org.eyebeam.SelfControl "BlockDuration" $1
fi
}
autoload sc-set
@Matthewspear

This comment has been minimized.

Copy link
Owner Author

@Matthewspear Matthewspear commented Feb 28, 2016

Some simple aliases I use for running SelfControl via the terminal:

sc-read - prints current settings
sc-run - used to set a block running
sc-check - used for checking a block once it is finished
sc-set 10 - sets the block length in minutes, this example is of 10 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.