Skip to content

Commit 4e17382

Browse files
committed
chore: use same laptop display check as cosmic-comp
1 parent 2482ec7 commit 4e17382

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cosmic-settings/src/utils.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ pub fn display_name(name: &str, physical: (u32, u32)) -> String {
77
let inches = ((physical.0.pow(2) + physical.1.pow(2)) as f32).sqrt() * 0.039_370_1;
88
let inches_string = format!("{inches:.1}\"");
99

10-
match name {
11-
"eDP-1" | "LVDS1" => {
12-
fl!("display", "laptop", size = inches_string.as_str())
13-
}
14-
output => fl!(
10+
if name.starts_with("eDP-") || name.starts_with("LVDS-") || name.starts_with("DSI-") {
11+
fl!("display", "laptop", size = inches_string.as_str())
12+
} else {
13+
fl!(
1514
"display",
1615
"external",
1716
size = inches_string.as_str(),
18-
output = output
19-
),
17+
output = name
18+
)
2019
}
2120
}
2221

0 commit comments

Comments
 (0)