From a778ab38977b99edb79275cf3ad2ddffa24044f7 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 5 Nov 2024 09:40:12 +0300 Subject: Extract is_laptop_panel() to utils --- src/utils/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils') diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 959a804e..3d40d890 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -224,6 +224,10 @@ pub fn output_matches_name(output: &Output, target: &str) -> bool { name.matches(target) } +pub fn is_laptop_panel(connector: &str) -> bool { + matches!(connector.get(..4), Some("eDP-" | "LVDS" | "DSI-")) +} + pub fn with_toplevel_role( toplevel: &ToplevelSurface, f: impl FnOnce(&mut XdgToplevelSurfaceRoleAttributes) -> T, -- cgit