Skip to content

Latest commit

 

History

History

Week9

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

TM-CLOCK

Video Demo: 👀

Description:

Generated by new Bing

This project is a Python script that implements a Pomodoro timer, which is a time management method that alternates work and break periods. The Pomodoro technique is designed to improve productivity and focus by breaking down tasks into manageable chunks and avoiding distractions.

The script can be run from the command line with different options to specify the duration of work or break periods, or use the default values of 25 minutes for work and 5 minutes for break. The script accepts the following arguments:

  • -t followed by an integer to set the work period in minutes
  • -b followed by an integer to set the break period in minutes
  • -h to display the help message

The script uses the time.perf_counter() function from the time module to measure the elapsed time and update the screen every second with a countdown and a progress bar. The countdown shows the remaining minutes and seconds, while the progress bar shows how much of the current period has been completed using 🍅 and – symbols.

The script also uses the subprocess.Popen() function from the subprocess module to send notification messages when the time is up, depending on the operating system. The notification messages can be customized by passing them as arguments to the tomato() function, which takes two parameters: minutes and notify_msg. The script supports three types of notifications:

  • For Linux systems, it uses the notify-send command with 🍅 as icon
  • ...

The script can be interrupted at any time by pressing Ctrl+C, which will print a goodbye message and exit gracefully.