andreasgrill / auto-selfcontrol

Small utility to schedule start and stop times of SelfControl
MIT License
305 stars 37 forks source link

Move default config file to ~/.config/auto-selfcontrol #62

Closed sbibauw closed 3 years ago

sbibauw commented 3 years ago

The config file will be looked for in

This will make it easier to backup and sync it across installs. Answers #58

It also works on new ARM-based M1 Macs where brewed bins are in /opt/homebrew/, no longer in /usr/local/.

This will not move an existing config file. Moving can be done manually:

mv /usr/local/etc/auto-selfcontrol/config.json ~/.config/auto-selfcontrol/

auto-selfcontrol will find this new location first.

andreasgrill commented 3 years ago

Thanks for the PR! I agree that storing the configuration in the user home dir is better for backups and migrations. I think we need to specify the settings dir when auto-selfcontrol is started via launchd as a launch daemon. I've tried this locally and will fix this with an additional commit after merging your PR.