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
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -117,7 +117,7 @@ done
|
|||||||
"#;
|
"#;
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
fn xorg_intel(bus_id: &str) -> String {
|
pub fn xorg_intel(bus_id: &str) -> String {
|
||||||
format!(
|
format!(
|
||||||
r#"# Automatically generated by lapctl
|
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!(
|
format!(
|
||||||
r#"# Automatically generated by lapctl
|
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()) {
|
let source_name = match igpu_vendor.map(|s| s.as_str()) {
|
||||||
Some("intel") => "modesetting".to_string(),
|
Some("intel") => "modesetting".to_string(),
|
||||||
Some("amd") => {
|
Some("amd") => {
|
||||||
|
|||||||
Reference in new issue
Block a user