println!("\x1b[36m{}\x1b[0m", ascii_art); println!("\x1b[1;32m qfetch v{}\x1b[0m\n", VERSION);
fn get_resolution() -> String { if cfg!(target_os = "windows") { let output = Command::new("wmic") .args(&["path", "Win32_VideoController", "get", "CurrentHorizontalResolution,CurrentVerticalResolution"]) .output(); if let Ok(out) = output { let stdout = String::from_utf8_lossy(&out.stdout); let lines: Vec<&str> = stdout.lines().collect(); if lines.len() > 1 { let parts: Vec<&str> = lines[1].split_whitespace().collect(); if parts.len() >= 2 { return format!("{}x{}", parts[0], parts[1]); } } } } else if cfg!(target_os = "linux") let output = Command::new("xrandr").arg("--current").output(); if let Ok(out) = output let stdout = String::from_utf8_lossy(&out.stdout); for line in stdout.lines() if line.contains(" connected") && line.contains('x') if let Some(res) = line.split_whitespace().find( new desktop command
fn display(info: &SystemInfo) { let ascii_art = r#" ╔══════════════════════╗ ║ ██ ║ ║ ████ ║ ║ ██████ ║ ║ ████████ ║ ║ ██████████ ║ ║ ██ ██████ ██ ║ ║ ██ ████ ██ ║ ║ ██ ██ ██ ║ ╚══════════════════════╝ "#; println
// Disk (root partition) let mut disk_info = "N/A".to_string(); for disk in sys.disks() { if cfg!(target_os = "windows") && disk.mount_point().to_str() == Some("C:") || cfg!(target_os = "linux") && disk.mount_point().to_str() == Some("/") || cfg!(target_os = "macos") && disk.mount_point().to_str() == Some("/") { let total = disk.total_space() / (1024 * 1024 * 1024); let available = disk.available_space() / (1024 * 1024 * 1024); let used = total - available; disk_info = format!("{} GiB / {} GiB", used, total); break; } } 32m qfetch v{}\x1b[0m\n"
fn main() { let args: Vec<String> = env::args().collect(); if args.len() > 1 && (args[1] == "-h" || args[1] == "--help") print_help(); return;
[package] name = "qfetch" version = "1.0.0" edition = "2021" [dependencies] sysinfo = "0.30" whoami = "1.4"