Last active
July 29, 2016 12:57
-
-
Save matthewspear/fa5224f759fca735db7a to your computer and use it in GitHub Desktop.
SelfControl Terminal Shortcuts
This file contains 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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some simple aliases I use for running SelfControl via the terminal:
sc-read
- prints current settingssc-run
- used to set a block runningsc-check
- used for checking a block once it is finishedsc-set 10
- sets the block length in minutes, this example is of 10 minutes