- Download to your computer
- Open your .bash_profile
- Insert the following code anywhere:
function timer() {
python path/to/timer.py
}
function pomodorro() {
python path/to/pomodorro.py
}
Only works on MacOS
Requires your python
cli command to use python 3.6+. Check it by running python --version
. You might need to upgrade or use python3 in the bash functions.
Start a new terminal window and type timer
It will close your browser (or any other app) after a specified time.
~/Documents:$ timer
How many minutes shall I wait? (Default: 60) | 45
Which app do you want to close at the end? (Default: Chrome) |
Ok, closing Chrome at 12:10!
...
Start a new terminal window and type pomodorro
It will endlessly open and close your browser at the specified intervals until you stop the script with Ctrl + c
~/Documents:$ pomodorro
How many minutes on? (25) |
How many minutes off? (5) |
Pick an app to close (Chrome) |
Which url do you want to open? (https://google.com) |
Closing Chrome at 13:56.