diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-03-28 00:58:49 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-03-28 00:58:49 +0530 |
| commit | e3bfc2f09b39774a7665592b052e2d3f9a0c8652 (patch) | |
| tree | ed9b71cdafbf532f4a18aefe13fd19ddabf193e7 /src/pomo/state.rs | |
| parent | 86faa671ec6aa091fc7005c02daf3618312c080f (diff) | |
| download | pomoru-0.1.2.tar.xz pomoru-0.1.2.zip | |
bump version to 0.1.2v0.1.2
Diffstat (limited to 'src/pomo/state.rs')
| -rw-r--r-- | src/pomo/state.rs | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/pomo/state.rs b/src/pomo/state.rs index ec66255..8574d38 100644 --- a/src/pomo/state.rs +++ b/src/pomo/state.rs @@ -1,29 +1,41 @@ +use notify_rust::Notification; use ratatui::widgets::ListState; +use serde::{Deserialize, Serialize}; use std::time::Duration; -use serde::{ Serialize, Deserialize }; -use notify_rust::Notification; #[derive(PartialEq, Clone, Copy)] -pub enum SessionMode { Work, ShortBreak, LongBreak } +pub enum SessionMode { + Work, + ShortBreak, + LongBreak, +} #[derive(PartialEq, Clone, Copy)] -pub enum AppScreen { Timer, Tasks } +pub enum AppScreen { + Timer, + Tasks, +} #[derive(PartialEq, Clone, Copy)] -pub enum InputMode { Normal, Insert, Edit, TimerEdit } +pub enum InputMode { + Normal, + Insert, + Edit, + TimerEdit, +} #[derive(Serialize, Deserialize)] pub struct Config { pub work_time_mins: u64, pub short_break_mins: u64, pub long_break_mins: u64, - pub tasks: Vec<Task> + pub tasks: Vec<Task>, } #[derive(Serialize, Deserialize, Clone)] pub struct Task { pub title: String, - pub is_done: bool + pub is_done: bool, } pub struct Pomo { @@ -40,7 +52,7 @@ pub struct Pomo { pub tasks: Vec<Task>, pub task_state: ListState, pub input_buffer: String, - pub should_quit: bool + pub should_quit: bool, } impl Pomo { @@ -60,7 +72,7 @@ impl Pomo { tasks: Vec::new(), task_state: ListState::default(), input_buffer: String::new(), - should_quit: false + should_quit: false, } } |