chore: use same laptop display check as cosmic-comp
This commit is contained in:
parent
2482ec709b
commit
4e17382b14
1 changed files with 6 additions and 7 deletions
|
|
@ -7,16 +7,15 @@ pub fn display_name(name: &str, physical: (u32, u32)) -> String {
|
||||||
let inches = ((physical.0.pow(2) + physical.1.pow(2)) as f32).sqrt() * 0.039_370_1;
|
let inches = ((physical.0.pow(2) + physical.1.pow(2)) as f32).sqrt() * 0.039_370_1;
|
||||||
let inches_string = format!("{inches:.1}\"");
|
let inches_string = format!("{inches:.1}\"");
|
||||||
|
|
||||||
match name {
|
if name.starts_with("eDP-") || name.starts_with("LVDS-") || name.starts_with("DSI-") {
|
||||||
"eDP-1" | "LVDS1" => {
|
fl!("display", "laptop", size = inches_string.as_str())
|
||||||
fl!("display", "laptop", size = inches_string.as_str())
|
} else {
|
||||||
}
|
fl!(
|
||||||
output => fl!(
|
|
||||||
"display",
|
"display",
|
||||||
"external",
|
"external",
|
||||||
size = inches_string.as_str(),
|
size = inches_string.as_str(),
|
||||||
output = output
|
output = name
|
||||||
),
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue