From 549025dfe7627bcad7d9b6e39d491ca6555abc7e Mon Sep 17 00:00:00 2001 From: mr-forust Date: Sun, 5 Jul 2026 02:53:49 +0200 Subject: [PATCH] chore: release v1.2.1 --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- VERSION | 2 +- src/main.rs | 13 ++++++++++++- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e733523..13f9f4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are documented here. The project uses semantic versioning. Tags are formatted as `vMAJOR.MINOR.PATCH`. +## [1.2.1] - 2026-07-05 + +### Changed + +- Updated the TUI running screen to center a larger termdown-style ASCII time-left display above progress and post-countdown commands. + ## [1.2.0] - 2026-07-05 ### Added @@ -42,6 +48,7 @@ The project uses semantic versioning. Tags are formatted as `vMAJOR.MINOR.PATCH` - Added YAML configuration, CLI `init`, `preview`, and `run` commands. - Added Gitea CI and tag-based release workflows. +[1.2.1]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.1 [1.2.0]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.2.0 [1.1.3]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.3 [1.1.2]: https://gitea.forust.xyz/forust/gosleep/releases/tag/v1.1.2 diff --git a/Cargo.lock b/Cargo.lock index ef4008a..7eed7f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -298,7 +298,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "gosleep-timer" -version = "1.2.0" +version = "1.2.1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index cb46888..d36057a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gosleep-timer" -version = "1.2.0" +version = "1.2.1" edition = "2024" rust-version = "1.85" description = "Terminal sleep timer for Linux desktop actions, with YAML config and a Rust TUI" diff --git a/VERSION b/VERSION index 26aaba0..6085e94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.0 +1.2.1 diff --git a/src/main.rs b/src/main.rs index 49360b9..87be42d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1669,6 +1669,7 @@ fn format_gauge_label(progress: f64) -> String { } fn ascii_time(value: &str) -> Vec { + const GLYPH_WIDTH: usize = 10; let mut rows = vec![String::new(); 7]; for ch in value.chars() { let glyph = ascii_glyph(ch); @@ -1676,7 +1677,7 @@ fn ascii_time(value: &str) -> Vec { if !row.is_empty() { row.push(' '); } - row.push_str(part); + row.push_str(&format!("{part: 0); + assert!(rows.iter().all(|row| row.len() == width)); + } + fn visible_field_keys(config: &Config) -> Vec { visible_fields(config) .into_iter()