diff --git a/Cargo.lock b/Cargo.lock index 4c196db..40ea13a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1012,6 +1012,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "owo-colors" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" + [[package]] name = "parking_lot" version = "0.12.5" @@ -1319,6 +1325,7 @@ dependencies = [ "aria2-ws", "dialoguer", "futures", + "owo-colors", "reqwest", "select", "serde", diff --git a/Cargo.toml b/Cargo.toml index f1ea683..f3da149 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ edition = "2024" aria2-ws = "0.5.1" dialoguer = { version = "0.12.0", features = ["fuzzy-select"] } futures = "0.3.31" +owo-colors = "4.3.0" reqwest = { version = "0.12", features = ["json"] } select = "0.6.1" serde = "1.0.228" diff --git a/src/main.rs b/src/main.rs index 79850da..9c61d3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ use aria2_ws::{Callbacks, Client, TaskOptions}; use dialoguer::FuzzySelect; use futures::FutureExt; +use owo_colors::OwoColorize; use select::document::Document; use select::predicate::Name; use serde::Deserialize; @@ -27,13 +28,13 @@ async fn main() -> Result<(), Box> { / ( <_> ) | | | \ / / __ \| | \/\ ___/ / Y \/ __ \| | \/ __ \_/ /_/ > ___/| | \/ /_______ /\____/|__| |__| \/\_/ (____ /__| \___ > \____|__ (____ /___| (____ /\___ / \___ >__| \/ \/ \/ \/ \/ \/ \//_____/ \/ - "#; + "#.yellow(); println!("{ascii}"); let server_url = "https://api.michijackson.xyz/search?q=".to_owned(); let mut input = String::new(); - eprint!("Search: "); + eprint!("{}", "Search: ".bright_yellow()); io::stdin() .read_line(&mut input) .expect("failed to read input"); @@ -58,7 +59,7 @@ async fn main() -> Result<(), Box> { .collect(); let selection = FuzzySelect::new() - .with_prompt("Pick your software") + .with_prompt(format!("{}", "Pick your software".bright_yellow())) .items(&items2) .interact() .unwrap();