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:
sankalp committed 2026-05-29 16:38:24 +05:45
1 parent 3684c5b071
commit 34a57007d1
3 files changed
+11 -33

No files matched your search

+3 -12
View File
@@ -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]);