Skip to content

tennets/ptime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ptime

a basic πŸ… timer

Table of Contents

Quick-Start

Install

  • 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)

Usage

  • Start the timer for a cycle with ptime start.
  • Display help message with ptime -h.

Configure timer

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

ptime Features

  • Set focus time
  • Set short break time
  • Set long break time
  • Set a cycle length in πŸ… units

ptime Limitations

  • Tested by using it not via actual tests
  • Work on macOS, but should work also on Linux machines
  • Does not support Windows machine

Rationale

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.

Pomodoro Techinque TL; DR

Refer to this document for a detailed introduction to the technique. Here's a breakdown of the method

  1. Decide the task you want to do
  2. Set the FOCUS timer, typically 25 minutes.
  3. Work on the task (one πŸ…)
  4. When the focus time is up, take a SHORT BREAK, typically 5 minutes.
  5. Go back to Step 2 and repeat until you complete four pomodoros
  6. After completing a POMODORO CYCLE, take a LONG BREAK, usually 15 to 30 minutes.
  7. After the long break, repeat from Step 2.

License

MIT Licence

About

a basic πŸ… timer

Resources

License

Stars

Watchers

Forks

Languages