a basic π timer
- Clone the repo
cd
to the folder- Source the script with
source ptime.sh
Now, if you call ptime
, you should see something like
ptime: missing required arguments.
ptime - a basic π
timer (v.0.0.1)
usage: ptime [options] [start]
options:
-h show this help message and exit
-f TIME set focus time to TIME minutes, default is 25
-s TIME set short break time to TIME minutes, default is 5
-l TIME set long break time to TIME minutes, default is 15
-c N_UNITS set pomodoro cycle to N_UNITS π
units, default is 4
by @tennets (GitHub)
- Start the timer for a cycle with
ptime start
. - Display help message with
ptime -h
.
Optional flags configure the timer.
- To set custom focus time to
TIME
minutes, use the-f
flag:ptime -f TIME
- To set custom short break time to
TIME
minutes, use the-s
flag:ptime -s TIME
- To set custom long break to
TIME
minutes, use the-l
flag:ptime -l TIME
- To set a custom number of π
units before the long break to
N_UNITS
, use the-c
flag:ptime -c N_UNITS
- Set focus time
- Set short break time
- Set long break time
- Set a cycle length in π units
- Tested by using it not via actual tests
- Work on macOS, but should work also on Linux machines
- Does not support Windows machine
ptime
is for those (like me) using the terminal for coding or interacting with a POSIX-oriented OS( (like Linux and macOS).
However, ptime
is also for those who want to use the terminal more (like me).
ptime
is a fun learning project that helped me learn more about shell scripting.
Moreover, I use it every day.
Using ptime
for time tracking is less distracting than online pomodoro timers.
ptime
runs a pomodoro cycle.
It starts the first focus phase, followed by the first short break, then the second focus phase, and so on until four π
are completed and tracks the time for the long break.
Note that each phase follows the previous without interruptions.
Refer to this document for a detailed introduction to the technique. Here's a breakdown of the method
- Decide the task you want to do
- Set the FOCUS timer, typically 25 minutes.
- Work on the task (one π )
- When the focus time is up, take a SHORT BREAK, typically 5 minutes.
- Go back to Step 2 and repeat until you complete four pomodoros
- After completing a POMODORO CYCLE, take a LONG BREAK, usually 15 to 30 minutes.
- After the long break, repeat from Step 2.