diff --git a/src/config/WallpaperMatcher.cpp b/src/config/WallpaperMatcher.cpp index 2bb28ea..c27d80a 100644 --- a/src/config/WallpaperMatcher.cpp +++ b/src/config/WallpaperMatcher.cpp @@ -47,7 +47,7 @@ bool CWallpaperMatcher::outputExists(const std::string_view& s) { std::optional> CWallpaperMatcher::getSetting(const std::string_view& monName, const std::string_view& monDesc) { for (const auto& m : m_monitorStates) { - if (m.name != monName && m.desc != monDesc) + if (m.name != monName && !m.desc.starts_with(monDesc)) continue; for (const auto& s : m_settings) { @@ -65,7 +65,7 @@ std::optional> CWallpaperM std::optional> CWallpaperMatcher::matchSetting(const std::string_view& monName, const std::string_view& monDesc) { // match explicit for (const auto& s : m_settings) { - if (s.monitor != monName && s.monitor != "desc:"s + std::string{monDesc}) + if (s.monitor != monName && !("desc:"s + std::string{monDesc}).starts_with(s.monitor)) continue; return s; }