To install Be Productive:
pip install beproductive
If you use Windows, it's recommended to pip install win10toast
for nice Windows notifications.
You don't have to install win10toast
, but without it you will not get visible and audible notifications for Pomodoro. However, all notifications are also printed in your command line interface.
Windows
You have to open your command line tool with administrator privileges.
Linux (and MacOS?)
You have to run Be Productive with root privileges, either with sudo
before every command or once with su
.
Block / Unblock Websites
Block websites:
python -m beproductive
Block websites for x
minutes:
python -m beproductive block --time 45
Unblock all websites:
python -m beproductive unblock
Start a Pomodoro session:
python -m beproductive pomodoro
Pomodoro
The Pomodoro feature blocks your defined websites for 25 minutes. It notifies you to take a break and gives you access to all websites for 5 minutes. Although I recommend getting up and stretching instead :) This cycle is repeated 4 times.
You can customize Pomodoros. This is how you run 5 Pomodoros of 45 minutes with 10 minute breaks:
python -m beproductive pomodoro --time 45 --breaktime 10 --pomodoros 5
python -m beproductive pomodoro -t 45 -b 10 -p 5
Batch files
For quick access:
- Create batch files for the commands you need.
- Add a shortcut to each batch file to your desktop.
- Right click on the shortcut
- In the
Shortcut
tab, clickAdvanced
- Check the
Run as Administrator
box - You can even add a key binding.
I used:
- Ctrl + Alt + B to block all sites for 1 hour
- Ctrl + Alt + U to unblock all sites
- Ctrl + Alt + P to run a Pomodoro set
Example for a batch file block.bat
:
python -m beproductive block 60
Roadmap
- Notifications for Linux (https://pypi.org/project/notify2/) and Mac (?)
- Improve architecture, maybe use threads instead of
sleep()
- Set up a schedule, i.e., block websites between 9am and 5pm