Skip to content

Commit 67baeac

Browse files
committed
Improve terminal compatibility and color scheme
1 parent 1b32e6e commit 67baeac

File tree

5 files changed

+30
-35
lines changed

5 files changed

+30
-35
lines changed

src/cli/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn process_individual_wallet(
3131
let validation_status = match validation_result {
3232
ValidationResult::Valid => format!("{} {} {} {}",
3333
colors::gray("Validated:"), colors::green(validation_result.status_symbol()),
34-
colors::gray("Saved:"), colors::green("")),
34+
colors::gray("Saved:"), colors::green("OK")),
3535
ValidationResult::Mismatch => format!("{} {}",
3636
colors::gray("Validated:"), colors::red(validation_result.status_symbol())),
3737
ValidationResult::Error => format!("{} {}",

src/cli/probability.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ pub fn print_probability_breakdown(
286286
let pattern_len = pattern.chars().count();
287287
let locale = SystemLocale::default().unwrap();
288288

289-
println!("{}", colors::cyan("PROBABILITY CALCULATION"));
289+
println!("{}", colors::light_green("PROBABILITY CALCULATION"));
290290

291291
// Pattern Analysis
292-
println!("\n{} '{}'", colors::blue("→ Pattern Analysis:"), colors::bright_yellow(pattern));
292+
println!("\n{} '{}'", colors::white("→ Pattern Analysis:"), colors::light_green(pattern));
293293

294294
let mut calculations = Vec::new();
295295
let mut calc_string = String::new();
@@ -342,8 +342,8 @@ pub fn print_probability_breakdown(
342342
}
343343

344344
// Base Calculation
345-
println!("\n{}", colors::blue("→ Base Calculation:"));
346-
println!("{} = {}", calc_string, colors::yellow(&base_probability.to_formatted_string(&locale)));
345+
println!("\n{}", colors::white("→ Base Calculation:"));
346+
println!("{} = {}", calc_string, colors::light_green(&base_probability.to_formatted_string(&locale)));
347347

348348
if base_probability == 1 {
349349
println!("{}", colors::green("(Pattern matches network prefix or uses only wildcards - guaranteed match!)"));
@@ -360,7 +360,7 @@ pub fn print_probability_breakdown(
360360
"Prefix Mode"
361361
};
362362

363-
println!("\n{}", colors::blue(&format!("→ Position Analysis ({}):", mode_name)));
363+
println!("\n{}", colors::white(&format!("→ Position Analysis ({}):", mode_name)));
364364
println!("Address structure: [49 total characters]");
365365

366366
// Get the network prefix to check for locked positions
@@ -480,7 +480,7 @@ pub fn print_probability_breakdown(
480480

481481
// Show positions with their individual probabilities
482482
if !positions.is_empty() {
483-
println!("\n {}", colors::blue("Per-Position Probability Analysis:"));
483+
println!("\n {}", colors::white("Per-Position Probability Analysis:"));
484484

485485
// Check if position 0 is included (for prefix overlap detection)
486486
let has_position_zero = positions.contains(&0);
@@ -535,7 +535,7 @@ pub fn print_probability_breakdown(
535535

536536
// Show position probabilities for anywhere mode
537537
if !positions.is_empty() {
538-
println!("\n {}", colors::blue("Per-Position Probability Analysis:"));
538+
println!("\n {}", colors::white("Per-Position Probability Analysis:"));
539539

540540
let has_position_zero = positions.contains(&0);
541541
let pos0_prob = if has_position_zero {
@@ -580,7 +580,7 @@ pub fn print_probability_breakdown(
580580

581581
// Show position probabilities for prefix mode
582582
if !positions.is_empty() {
583-
println!("\n {}", colors::blue("Per-Position Probability Analysis:"));
583+
println!("\n {}", colors::white("Per-Position Probability Analysis:"));
584584

585585
for (i, &pos) in positions.iter().enumerate() {
586586
if i >= 5 && positions.len() > 6 {
@@ -611,7 +611,7 @@ pub fn print_probability_breakdown(
611611
colors::gray("Result:"), possible_positions);
612612

613613
// Final Calculation
614-
println!("\n{}", colors::blue("→ FINAL CALCULATION:"));
614+
println!("\n{}", colors::white("→ FINAL CALCULATION:"));
615615
println!(" {}", colors::gray("─────────────────────────"));
616616

617617
let expected_attempts = if positions.is_empty() {
@@ -704,7 +704,7 @@ pub fn print_probability_breakdown(
704704

705705
println!("\n{} Expected {} attempts • {} ({})",
706706
colors::yellow("→ SUMMARY:"),
707-
colors::bright_yellow(&format!("~{}", expected_attempts.to_formatted_string(&locale))),
707+
colors::light_green(&format!("~{}", expected_attempts.to_formatted_string(&locale))),
708708
colors::gray(&format!("1 in {}", expected_attempts.to_formatted_string(&locale))),
709709
percentage_str);
710710

src/cli/terminal.rs

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ pub mod colors {
5252
text.yellow().to_string()
5353
}
5454

55-
pub fn blue(text: &str) -> String {
56-
text.blue().to_string()
57-
}
58-
59-
pub fn cyan(text: &str) -> String {
60-
text.cyan().to_string()
61-
}
62-
6355
pub fn gray(text: &str) -> String {
6456
text.bright_black().to_string()
6557
}
@@ -72,6 +64,14 @@ pub mod colors {
7264
text.truecolor(255, 165, 0).to_string()
7365
}
7466

67+
pub fn white(text: &str) -> String {
68+
text.white().to_string()
69+
}
70+
71+
pub fn light_green(text: &str) -> String {
72+
text.bright_green().to_string()
73+
}
74+
7575
}
7676

7777
/// Terminal control sequences
@@ -85,11 +85,11 @@ pub mod terminal_codes {
8585

8686
/// Helper functions for formatted indicators
8787
pub fn failed_indicator() -> String {
88-
colors::red("")
88+
colors::red("FAIL")
8989
}
9090

9191
pub fn success_indicator() -> String {
92-
colors::green("")
92+
colors::green("OK")
9393
}
9494

9595
pub fn hide_cursor() {
@@ -276,14 +276,12 @@ pub fn print_progress(
276276
// Build progress string - ALWAYS show full progress info during search
277277
let locale = SystemLocale::default().unwrap();
278278
let mut progress = format!(
279-
"\r{}{} {} {} · {} {} keys/s {} · {} {}",
279+
"\r{}{} {} · {} {} keys/s · {} {}",
280280
terminal_codes::CLEAR_LINE,
281281
colors::gray("Attempts:"),
282282
total_attempts.to_formatted_string(&locale),
283-
colors::gray("·"),
284283
colors::gray("Speed:"),
285284
keys_per_second.to_formatted_string(&locale),
286-
colors::gray("·"),
287285
colors::gray("Runtime:"),
288286
time_str
289287
);
@@ -293,8 +291,7 @@ pub fn print_progress(
293291
use std::fmt::Write;
294292
let _ = write!(
295293
progress,
296-
" {} {} {found_count}/{count}",
297-
colors::gray("·"),
294+
" · {} {found_count}/{count}",
298295
colors::gray("Progress:")
299296
);
300297
}
@@ -304,8 +301,7 @@ pub fn print_progress(
304301
use std::fmt::Write;
305302
let _ = write!(
306303
progress,
307-
" {} {} {eta_str}",
308-
colors::gray("·"),
304+
" · {} {eta_str}",
309305
colors::gray("ETA:")
310306
);
311307
}
@@ -318,8 +314,7 @@ pub fn print_progress(
318314
let colored_luck = get_luck_color(luck_val, &luck_text);
319315
let _ = write!(
320316
progress,
321-
" {} {} {}",
322-
colors::gray("·"),
317+
" · {} {}",
323318
colors::gray("Luck:"),
324319
colored_luck
325320
);
@@ -347,7 +342,7 @@ pub fn print_result(result: &VanityResult, hex_mode: bool, wallet_number: usize,
347342
address.clone()
348343
};
349344

350-
println!("{} Address {}: {}", colors::blue("•"), wallet_number, highlighted_address);
345+
println!("{} Address {}: {}", colors::white("•"), wallet_number, highlighted_address);
351346

352347
let secret_label = if hex_mode { "Private Key" } else { "Mnemonic" };
353348
println!(" {} {}: {}", colors::gray("└"), secret_label, result.secret);

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn main() {
5353

5454
// Clear screen and show header first
5555
clear_screen_completely(); // Clear scrollback + screen like Linux `clear` command
56-
println!("{}", colors::blue(APP_HEADER));
56+
println!("{}", colors::white(APP_HEADER));
5757

5858
// Get password once if in hex mode
5959
let password = if config.hex_mode {

src/validation/address.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ pub enum ValidationResult {
1313
impl ValidationResult {
1414
pub fn status_symbol(&self) -> &'static str {
1515
match self {
16-
ValidationResult::Valid => "",
17-
ValidationResult::Mismatch => "",
18-
ValidationResult::Error => "",
16+
ValidationResult::Valid => "OK",
17+
ValidationResult::Mismatch => "X",
18+
ValidationResult::Error => "!",
1919
}
2020
}
2121
}

0 commit comments

Comments
 (0)