diff --git a/Cargo.lock b/Cargo.lock index c5fc198a..48ed8b0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -251,7 +251,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hyfetch" -version = "2.0.0-rc7" +version = "2.0.0" dependencies = [ "aho-corasick", "ansi_colours", diff --git a/Cargo.toml b/Cargo.toml index 29a93414..528ab752 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*"] [workspace.package] -version = "2.0.0-rc7" +version = "2.0.0" authors = ["Azalea Gui "] edition = "2021" rust-version = "1.75.0" diff --git a/crates/hyfetch/src/pride_month.rs b/crates/hyfetch/src/pride_month.rs index 20766f1f..5073be5e 100644 --- a/crates/hyfetch/src/pride_month.rs +++ b/crates/hyfetch/src/pride_month.rs @@ -307,11 +307,13 @@ pub fn start_animation(color_mode: AnsiMode) -> Result<()> { let mut frame: Wrapping = Wrapping(0); const SPEED: u8 = 2; - let frame_delay = Duration::from_secs_f32(1.0 / 25.0); + let frame_delay = Duration::from_secs_f32(2.0 / 25.0); execute!(io::stdout(), EnterAlternateScreen).context("failed to enter alternate screen")?; loop { + // Move cursor to the top left corner + print!("\x1B[H"); draw_frame(frame.0)?; frame += usize::from(SPEED); thread::sleep(frame_delay); diff --git a/hyfetch/pride_month.py b/hyfetch/pride_month.py index 8242057a..43203f84 100644 --- a/hyfetch/pride_month.py +++ b/hyfetch/pride_month.py @@ -105,8 +105,8 @@ def start_animation(): try: while 1: - # Clear the screen - print("\033[2J\033[H", end="") + # Move cursor to the top left corner + print("\033[H", end="") draw_frame() frame += speed sleep(frame_delay)