New Desktop Command -
let info = gather_info(); display(&info); }
// 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; } } new desktop command
// OS & Kernel let os = whoami::distro().unwrap_or_else(|| "Unknown".to_string()); let host = whoami::hostname(); let kernel = sys.kernel_version().unwrap_or_else(|| "Unknown".to_string()); let info = gather_info(); display(&info); } // Disk
else if cfg!(target_os = "macos") let output = Command::new("system_profiler") .args(&["SPDisplaysDataType", " "Unknown".to_string() } let info = gather_info()
}