tomatoshell icon indicating copy to clipboard operation
tomatoshell copied to clipboard

Fixed timer issues which arose when premature exit happens

Open abviv opened this issue 1 year ago • 0 comments

Typically, the log file contains the $SESSION which inherits the values which gets passed as the CLI args rather than the elapsed session value during the progress of the timer. This merge fixes it and uses the elapsed session by keeping a count of it.

GPT summary of the commit: This pull request includes changes to the tomatoshell script to improve logging and session tracking. The key updates involve adding new variables to track completed sessions and actual time spent, and modifying the logging and countdown functions accordingly.

Improvements to session tracking and logging:

  • tomatoshell: Added COMPLETED_SESSIONS and ACTUAL_TIME variables to track the number of completed sessions and the total actual time spent.
  • tomatoshell: Updated the write_to_log function to log COMPLETED_SESSIONS and convert ACTUAL_TIME back to minutes for accurate logging.
  • tomatoshell: Modified the countdown function to increment COMPLETED_SESSIONS and ACTUAL_TIME after each work session and store the initial time value for accurate tracking.

abviv avatar Dec 16 '24 17:12 abviv