You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move fully to Python3 and add SelfControl 4 support
Add support for the new CLI of SelfControl 4.
Support for older SelfControl versions <= 3 is removed to simplify
the code. Older Auto-SelfControl versions can still be installed
for SelfControl 3 support.
The upcoming macOS Monterey 12.3 will remove oob support for Python2.
Incorporate separate Python3 module in main module.
Resolves: #65
Copy file name to clipboardexpand all lines: README.md
+28-14
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,11 @@ You can plan for every weekday if and when SelfControl should start and stop.
12
12
13
13
## Installation
14
14
15
+
### Requirements
16
+
17
+
- Python3 needs to be installed. Check by running the following command in your terminal: `python3 --version`. If Python3 is missing, you should be able to install it through the Xcode developer tools or [Homebrew](https://brew.sh/).
18
+
-[SelfControl 4](http://selfcontrolapp.com)
19
+
15
20
### With Homebrew
16
21
17
22
The easiest way to install Auto-SelfControl is with [Homebrew](https://brew.sh/). Install Auto-SelfControl by running the following command in the Terminal:
@@ -41,15 +46,33 @@ Optionally create a symlink in your `/usr/local/bin` folder to access it from an
41
46
42
47
## Usage
43
48
44
-
Edit the time configuration (see [Configuration](#configuration)) first:
49
+
1. Open the configuration file:
50
+
51
+
To specify when and how Auto-SelfControl should activate, you need to configure a block-schedule in the following configuration file:
52
+
53
+
~/.config/auto-selfcontrol/config.json
54
+
55
+
You can also quickly access the configuration file through with the following command:
45
56
46
57
auto-selfcontrol config
47
58
48
-
When your block-schedule in [config.json](config.json) is ready, activate it by running:
59
+
2. Configure the block schedules
60
+
61
+
Check and update the configuration file:
62
+
63
+
- Change the `username` to your current macOS User
64
+
- Upda
65
+
- Have a look at the [Configuration](#configuration) section
66
+
67
+
3. Activate and apply the configuration
68
+
69
+
Changes to the configuration file are not automatically applied. If you want Auto-SelfControl to apply the configuration, you can use the `activate` command:
49
70
50
71
auto-selfcontrol activate
51
72
52
-
**Important:** If you change [config.json](config.json) later, you have to call the `auto-selfcontrol activate` command again or Auto-SelfControl will not take the modifications into account!
73
+
If there is an error in your configuration file, the output of the command should give you a hint where to look.
74
+
75
+
**Important:** If you change your configuration file later, you have to call the `auto-selfcontrol activate` command again or Auto-SelfControl will ignore the modifications. However, changes to an already running block-schedule are ignored until the block-schedule is over.
53
76
54
77
## Uninstall
55
78
@@ -62,10 +85,11 @@ Or, manually, by removing the directory where you installed the files.
62
85
sudo unlink /usr/local/bin/auto-selfcontrol
63
86
sudo rm -rf /usr/local/etc/auto-selfcontrol
64
87
rm -rf ~/auto-selfcontrol
88
+
rm -rf ~/.config/auto-selfcontrol
65
89
66
90
You also need to remove the automatic schedule by executing the following command in the Terminal:
@@ -143,13 +167,3 @@ The following listing shows another example that blocks twitter and reddit every
143
167
]
144
168
}
145
169
```
146
-
147
-
## Troubleshooting
148
-
149
-
### ImportError: No module named Foundation
150
-
151
-
If you've installed another version of Python (e.g., using Homebrew), you'll need to run Auto-SelfControl with the original Python installation from macOS:
152
-
153
-
sudo /usr/bin/python auto-selfcontrol.py
154
-
155
-
There are also other options, including installing `pyobjc` on your own Python version (`pip install pyobjc`). [See this thread for alternative solutions](https://stackoverflow.com/questions/1614648/importerror-no-module-named-foundation#1616361).
0 commit comments