aboutsummaryrefslogtreecommitdiff
path: root/src/pomo
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-06-12 23:19:51 +0530
committerRanXom <saiyedshizain@gmail.com>2026-06-12 23:19:51 +0530
commit85cb438cd0476d230667dec291022baee5793e79 (patch)
treed1c72d4c0ddbae40a9776e4130b37b6bf34bf50a /src/pomo
parentbb9688d43051c19cc2dc697389547470d8c18f62 (diff)
downloadpomoru-85cb438cd0476d230667dec291022baee5793e79.tar.xz
pomoru-85cb438cd0476d230667dec291022baee5793e79.zip
save auto_switch_sessions to config
Diffstat (limited to 'src/pomo')
-rw-r--r--src/pomo/mod.rs2
-rw-r--r--src/pomo/state.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/pomo/mod.rs b/src/pomo/mod.rs
index cd7a663..1d6ae34 100644
--- a/src/pomo/mod.rs
+++ b/src/pomo/mod.rs
@@ -18,6 +18,7 @@ impl Pomo {
short_break_mins: self.short_break_time.as_secs() / 60,
long_break_mins: self.long_break_time.as_secs() / 60,
tasks: self.tasks.clone(),
+ auto_switch_sessions: self.auto_switch_sessions,
};
let toml = toml::to_string_pretty(&config)?;
@@ -42,6 +43,7 @@ impl Pomo {
app.short_break_time = Duration::from_secs(config.short_break_mins * 60);
app.long_break_time = Duration::from_secs(config.long_break_mins * 60);
app.tasks = config.tasks;
+ app.auto_switch_sessions = config.auto_switch_sessions;
app.reset_timer_to_mode();
}
}
diff --git a/src/pomo/state.rs b/src/pomo/state.rs
index d53bc69..0e2037f 100644
--- a/src/pomo/state.rs
+++ b/src/pomo/state.rs
@@ -91,6 +91,7 @@ pub struct Config {
pub short_break_mins: u64,
pub long_break_mins: u64,
pub tasks: Vec<Task>,
+ pub auto_switch_sessions: bool,
}
#[derive(Serialize, Deserialize, Clone)]