From f6d36c655517ce3d41a1624522715dddabae8d9e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 12 Mar 2026 00:36:08 +0545 Subject: [PATCH] feat(src/commands): expose xorg_intel, xorg_amd, and generate_xrandr_script as public functions - Made the three helper functions public to allow external usage - Facilitates reuse of GPU configuration helpers - No functional changes beyond visibility --- src/commands/gpu.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/gpu.rs b/src/commands/gpu.rs index 4250493..173fdd7 100644 --- a/src/commands/gpu.rs +++ b/src/commands/gpu.rs @@ -117,7 +117,7 @@ done "#; // Helpers -fn xorg_intel(bus_id: &str) -> String { +pub fn xorg_intel(bus_id: &str) -> String { format!( r#"# Automatically generated by lapctl @@ -153,7 +153,7 @@ EndSection ) } -fn xorg_amd(bus_id: &str) -> String { +pub fn xorg_amd(bus_id: &str) -> String { format!( r#"# Automatically generated by lapctl @@ -189,7 +189,7 @@ EndSection ) } -fn generate_xrandr_script(igpu_vendor: Option<&String>) -> String { +pub fn generate_xrandr_script(igpu_vendor: Option<&String>) -> String { let source_name = match igpu_vendor.map(|s| s.as_str()) { Some("intel") => "modesetting".to_string(), Some("amd") => {