Merge branch 'master' into fix/zjeffer/thread-sanitizer-warning

This commit is contained in:
Alexis Rouillard
2025-10-05 10:51:47 +02:00
committed by GitHub
61 changed files with 875 additions and 453 deletions

View File

@@ -727,6 +727,7 @@ auto Workspaces::populateWorkspaceTaskbarConfig(const Json::Value &config) -> vo
populateBoolConfig(workspaceTaskbar, "enable", m_enableTaskbar);
populateBoolConfig(workspaceTaskbar, "update-active-window", m_updateActiveWindow);
populateBoolConfig(workspaceTaskbar, "reverse-direction", m_taskbarReverseDirection);
if (workspaceTaskbar["format"].isString()) {
/* The user defined a format string, use it */
@@ -774,6 +775,18 @@ auto Workspaces::populateWorkspaceTaskbarConfig(const Json::Value &config) -> vo
}
}
}
if (workspaceTaskbar["active-window-position"].isString()) {
auto posStr = workspaceTaskbar["active-window-position"].asString();
try {
m_activeWindowPosition =
m_activeWindowEnumParser.parseStringToEnum(posStr, m_activeWindowPositionMap);
} catch (const std::invalid_argument &e) {
spdlog::warn(
"Invalid string representation for active-window-position. Falling back to 'none'.");
m_activeWindowPosition = ActiveWindowPosition::NONE;
}
}
}
void Workspaces::registerOrphanWindow(WindowCreationPayload create_window_payload) {
@@ -1128,9 +1141,9 @@ std::optional<int> Workspaces::parseWorkspaceId(std::string const &workspaceIdSt
try {
return workspaceIdStr == "special" ? -99 : std::stoi(workspaceIdStr);
} catch (std::exception const &e) {
spdlog::error("Failed to parse workspace ID: {}", e.what());
spdlog::debug("Workspace \"{}\" is not bound to an id: {}", workspaceIdStr, e.what());
return std::nullopt;
}
}
} // namespace waybar::modules::hyprland
} // namespace waybar::modules::hyprland