tomatoshell
tomatoshell copied to clipboard
Fixed timer issues which arose when premature exit happens
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: AddedCOMPLETED_SESSIONSandACTUAL_TIMEvariables to track the number of completed sessions and the total actual time spent. -
tomatoshell: Updated thewrite_to_logfunction to logCOMPLETED_SESSIONSand convertACTUAL_TIMEback to minutes for accurate logging. -
tomatoshell: Modified thecountdownfunction to incrementCOMPLETED_SESSIONSandACTUAL_TIMEafter each work session and store the initial time value for accurate tracking.