You aren't limited to the dictionary. You can use look to search any text file you have. This is useful for finding lines in a list or log file.
// Screen resolution let resolution = get_resolution(); new desktop command
// GPU (first detected) let gpu = if cfg!(target_os = "windows") get_windows_gpu() else if cfg!(target_os = "linux") get_linux_gpu() else if cfg!(target_os = "macos") get_macos_gpu() else "Unknown".to_string() ; You aren't limited to the dictionary
look [string] [file]
The complete piece is ready to compile and run as a new desktop command. // Screen resolution let resolution = get_resolution(); //
# Create project cargo new qfetch cd qfetch
// Uptime let uptime_secs = System::uptime(); let days = uptime_secs / 86400; let hours = (uptime_secs % 86400) / 3600; let minutes = (uptime_secs % 3600) / 60; let uptime = format!("{}d {}h {}m", days, hours, minutes);