displays_logical_linux 0.1.0

Linux logical display querying support for the displays crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use displays_logical_types::LogicalDisplay;
use displays_types::DisplayIdentifierInner;

pub(crate) fn logical_display_matches(
    display: &LogicalDisplay,
    id: &DisplayIdentifierInner,
) -> bool {
    id.outer
        .name
        .as_ref()
        .is_none_or(|name| display.metadata.name.starts_with(name))
        && id
            .path
            .as_ref()
            .is_none_or(|path| display.metadata.path.starts_with(path))
}