diff options
author | Silas Bartha <[email protected]> | 2024-01-04 22:49:55 -0500 |
---|---|---|
committer | Silas Bartha <[email protected]> | 2024-01-04 22:51:25 -0500 |
commit | 3960a2bb929150639d90d4d178f942976bd5a219 (patch) | |
tree | ae0139af32f1aab58603e653a5c55b64f4346eb5 /src/config.rs | |
parent | 37c7a239b81102d2d1a75b9542a91468676cbd98 (diff) |
Refactor + Document
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..a14ff7c --- /dev/null +++ b/src/config.rs @@ -0,0 +1,28 @@ +use serde::{Serialize, Deserialize}; + +/// Configuration for program +#[derive(Serialize, Deserialize, Clone, Copy)] +pub struct PomdConfig { + /// Length of work phases in seconds + pub work_duration: f32, + /// Length of short breaks in seconds + pub short_break_duration: f32, + /// Length of long breaks in seconds + pub long_break_duration: f32, + /// Number of iterations between long breaks + pub num_iterations: u8, + /// Whether to show system notifications + pub notify: bool, +} + +impl Default for PomdConfig { + fn default() -> Self { + Self { + work_duration: 15.0 * 60.0, + short_break_duration: 5.0 * 60.0, + long_break_duration: 25.0 * 60.0, + num_iterations: 4, + notify: true, + } + } +} |