Semi-stable fix for GPU display quirks.

This commit is contained in:
river 2023-03-28 22:29:54 -04:00
parent bc9d61ddcb
commit c96bc0a87b
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# oxidefetch 1.2.0
# oxidefetch 1.2.1
Fully cross platform Neofetch clone written in Rust. Up to 25 times faster than Neofetch!
![alt text](image.png "Example output of OxideFetch on a WSL2 Arch Linux host")
@ -75,3 +75,4 @@ Quirk: Multiple GPUs will display strangely. Proposed fix is to replace newlines
**1.1.1:** Made sure that linux system detection won't fail if Linux has a capital L.
**1.1.2:** Replaced *nix dependency on ```bash``` with dependency on ```sh```.
**1.2.0:** Allowed users to enable field titles as a compile-time feature. Tentative fix for GPU display issues on Linux.
**1.2.1:** Possibly stable fix for GPU display quirks.

View File

@ -133,10 +133,10 @@ impl InformationStruct {
}
}
_ => {
// On *nix, hopefully, "lspci | grep VGA | cut -d "VGA compatible controller: "" gives us our GPU name.
// On *nix, hopefully, "lspci | grep VGA | awk -F 'VGA compatible controller: ' '{print $2}'" gives us our GPU name.
// Since pipes can't be processed as arguments, we need to do all this in a subshell under SH.
let command_output = std::process::Command::new("sh")
.args(["-c", "lspci | grep VGA | cut -d \"VGA compatible controller: \""])
.args(["-c", "lspci | grep VGA | awk -F 'VGA compatible controller: ' '{print $2}'"])
.output();
let gpu = match command_output {
Ok(gpu_info) => Some(