Schedule automatic activations of SelfControl, similar to andreasgrill/auto-selfcontrol.
SelfControl requires the user to install a helper tool (requiring the user to input their password) in order to activate. This is annoying but I've added functionality such that if you cancel the helper tool, this program will reattempt to activate SelfControl, hence the helper tool popup window immediatly reappears.
This program installs launch agents, not daemons, as daemons don't have the necessary permissions to activate SelfControl.
This program will activate SelfControl with the blocklist you have specified in the SelfControl app, but if someone wants blocks to have individual blocklists I could add this.
The cli accepts 4 commands:
After altering the configuration file, re-deploy with --deploy to update.
The config file contains a path to the SelfControl app and a path to the LaunchAgents folder. Alter these if the paths in the example config file aren't accurate for your machine.
curl -s -O -L \
https://github.com/AlexanderDickie/auto-selfcontrol-rs/releases/download/v2/auto-selfcontrol-rs.x86_64-apple-darwin \
mv auto-selfcontrol-rs.x86_64-apple-darwin auto-selfcontrol-rs
chmod +x auto-selfcontrol-rs
./auto-selfcontrol-rs --write_example_config
// now edit the config at ~/.config/auto-selfcontrol-rs/config.aoml to your liking
./auto-selfcontrol-rs --deploy
curl -s -O -L \
https://github.com/AlexanderDickie/auto-selfcontrol-rs/releases/download/v2/auto-selfcontrol-rs.aarch64-apple-darwin \
mv auto-selfcontrol-rs.aarch64-apple-darwin auto-selfcontrol-rs
chmod +x auto-selfcontrol-rs
./auto-selfcontrol-rs --write_example_config
// now edit the config at ~/.config/auto-selfcontrol-rs/config.aoml to your liking
./auto-selfcontrol-rs --deploy