Make status file nicer

This commit is contained in:
2024-07-10 21:05:57 -04:00
parent d4aa36f9b9
commit d84b83c6d5
2 changed files with 10 additions and 3 deletions

View File

@@ -145,16 +145,19 @@ impl App {
fn write_status(&self) {
let status = match self.state {
State::InputIntention | State::InputDuration => constants::STATUS_CONFIGURE.to_string(),
State::InProgress => format!(
"{} - {}",
"🎯 {} - {}",
self.user_intention,
duration_as_str(&self.session_remaining)
),
State::Paused => format!(
"antidrift paused - {}",
"{} - {}",
constants::STATUS_PAUSED,
duration_as_str(&self.session_remaining)
),
_ => format!("antidrift inactive"),
State::End => constants::STATUS_RATE_SESSION.to_string(),
State::ShouldQuit => constants::STATUS_QUIT.to_string(),
};
let path = shellexpand::tilde(constants::STATUS_FILE).to_string();