This commit adds a feature to load Pominal
configuration from a JSON configuration file.
A new data type called PominalConfig was created for
the purpose of configuring Pominal.
A new factory function called newPominalConfig was
created which takes the path to the JSON configuration
file and the flag overrides and generates the new
PominalConfig value.
Here, the JSON config is parsed to create the initial
configuration and any flag overrides can override
the corresponding fields in the PominalConfig object.
Currently only the sessions times and the maximum work
sessions per Pominal cycle have flag overrides.
Additionally users can now configure custom notification
messages for each session type from the configuration file.
There are currently no flag overrides for these.
This commit resolvesdananglin/Pominal#1
This commit fixes the issue where the app was using
the full height of the terminal screen.
The fix include setting the 'fullscreen' boolean to
false and explicity defining the size using SetRect.
This commit removes the need to calculate the time remaining in a
session and instead introduces a countdown counter which decrements at
each one second 'tick'. This stabilizes the interface where it appeared
that he timer was randomly pausing or skipping time.
A summary of changes made in this commit includes:
- Updated the command line flags so that they are easier to remember.
- The work, short break and long break session times are now parsed and
converted to type float64. These times represent the total amount of
seconds.
- Removal of timer and finish from Pominal.
- The method that calculates the time remaining is removed.
- A countdown counter is added to the Pominal type.
- Updated alert message for the desktop notification.
- Simplified the Run method by moving the logic to chosse the next session
in a separate method.
This is the first commit of Pominal,
a Pomodoro application for the terminal.
This commit includes:
- Timers for work sessions, short breaks and long breaks.
- Flags to allow users to configure Pominal to their preferences.
- Graceful shutdown when a SIGINT or SIGTERM is sent to the application.