feat: more information
This commit is contained in:
parent
72427195dc
commit
2b84d91ed8
2 changed files with 13 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -16,7 +16,7 @@ checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bunbun"
|
name = "bunbun"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"colored",
|
"colored",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
|
|
15
src/main.rs
15
src/main.rs
|
@ -7,6 +7,13 @@ fn main() {
|
||||||
let bottom = format!("c({})({})", "\"".red(), "\"".red()).to_string();
|
let bottom = format!("c({})({})", "\"".red(), "\"".red()).to_string();
|
||||||
let ascii = vec!["(\\ /)", "( . .)", &bottom];
|
let ascii = vec!["(\\ /)", "( . .)", &bottom];
|
||||||
|
|
||||||
|
let hostname = fallible::hostname().unwrap_or(String::from("N/A"));
|
||||||
|
let user = env!("USER");
|
||||||
|
|
||||||
|
let arch = arch();
|
||||||
|
|
||||||
|
let combined = format!("{}@{}", user, hostname);
|
||||||
|
|
||||||
let kernel = System::kernel_version().unwrap_or(String::from("N/A"));
|
let kernel = System::kernel_version().unwrap_or(String::from("N/A"));
|
||||||
let pretty = distro();
|
let pretty = distro();
|
||||||
let wm: &str;
|
let wm: &str;
|
||||||
|
@ -19,7 +26,9 @@ fn main() {
|
||||||
wm = "N/A";
|
wm = "N/A";
|
||||||
}
|
}
|
||||||
|
|
||||||
println!(" {} {} {}", ascii[0], "Kernel".red(), kernel);
|
println!("{:>34}", combined.magenta().bold());
|
||||||
println!(" {} {} {}", ascii[1], "WM".green(), wm);
|
println!("{:>19} {}", "Arch".cyan(), arch);
|
||||||
println!(" {} {} {}", ascii[2], "OS".blue(), pretty);
|
println!("{:>9} {:>11} {}", ascii[0], "Kernel".red(), kernel);
|
||||||
|
println!("{:>10} {:>6} {}", ascii[1], "WM".green(), wm);
|
||||||
|
println!("{:>29} {:>5} {}", ascii[2], "OS".blue(), pretty);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue