refactor(src/commands): Cleanup command printing and simplify GPU environment handling
Enhancements: - Remove unnecessary multiline formatting in GPU, status, and temperature commands - Consolidate zone type checks into a single condition - Simplify environment variable tuple definitions
This commit is contained in:
3 files changed
+11
-33
No files matched your search
+3
-12
@@ -864,18 +864,9 @@ fn run_on_dgpu(command: &[String]) {
|
||||
}
|
||||
|
||||
let env_vars = vec![
|
||||
(
|
||||
"__NV_PRIME_RENDER_OFFLOAD",
|
||||
"1".to_string(),
|
||||
),
|
||||
(
|
||||
"__GLX_VENDOR_LIBRARY_NAME",
|
||||
"nvidia".to_string(),
|
||||
),
|
||||
(
|
||||
"__VK_LAYER_NV_optimus",
|
||||
"NVIDIA_only".to_string(),
|
||||
),
|
||||
("__NV_PRIME_RENDER_OFFLOAD", "1".to_string()),
|
||||
("__GLX_VENDOR_LIBRARY_NAME", "nvidia".to_string()),
|
||||
("__VK_LAYER_NV_optimus", "NVIDIA_only".to_string()),
|
||||
];
|
||||
|
||||
let mut cmd = Command::new(&command[0]);
|
||||
|
||||
Reference in new issue
Block a user