From 7929a4355dd97ec04d01b0c3f6182e8b8aa1469b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kondor=20D=C3=A1niel?= Date: Fri, 4 Sep 2026 23:38:25 +0200 Subject: [PATCH] wcm: support metadata files installed by wayfire-plugin --- src/wcm.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/wcm.cpp b/src/wcm.cpp index a9ffa02..f57623d 100644 --- a/src/wcm.cpp +++ b/src/wcm.cpp @@ -1665,6 +1665,33 @@ void WCM::load_config_files() } } + // also add XDG specific paths + namespace fs = std::filesystem; + fs::path xdg_data_dir; + if (char *c_xdg_data_dir = std::getenv("XDG_DATA_HOME")) + { + xdg_data_dir = fs::path(c_xdg_data_dir); + } else if (char *c_user_home = std::getenv("HOME")) + { + xdg_data_dir = fs::path(c_user_home) / ".local" / "share"; + } + + if (!xdg_data_dir.empty()) + { + auto managed_metadata_path = xdg_data_dir / "wayfire" / "plugin-manager" / + "install" / "share" / "wayfire" / "metadata"; + if (fs::exists(managed_metadata_path)) + { + wayfire_xmldirs.push_back(managed_metadata_path.string()); + } + + auto metadata_path = xdg_data_dir / "wayfire" / "metadata"; + if (fs::exists(metadata_path)) + { + wayfire_xmldirs.push_back(metadata_path.string()); + } + } + wayfire_xmldirs.push_back(WAYFIRE_METADATADIR); wf_config_mgr =