modules/hyprland/workspaces: remove deprecated property

This commit is contained in:
Austin Horstman 2024-06-15 18:34:45 -05:00
parent 9ba5825009
commit bac4d03813
No known key found for this signature in database
2 changed files with 3 additions and 13 deletions

View File

@ -66,7 +66,6 @@ class Workspaces : public AModule, public EventHandler {
auto populateBoolConfig(const Json::Value& config, const std::string& key, bool& member) -> void; auto populateBoolConfig(const Json::Value& config, const std::string& key, bool& member) -> void;
auto populateSortByConfig(const Json::Value& config) -> void; auto populateSortByConfig(const Json::Value& config) -> void;
auto populateIgnoreWorkspacesConfig(const Json::Value& config) -> void; auto populateIgnoreWorkspacesConfig(const Json::Value& config) -> void;
auto populatePersistentWorkspacesConfig(const Json::Value& config) -> void;
auto populateFormatWindowSeparatorConfig(const Json::Value& config) -> void; auto populateFormatWindowSeparatorConfig(const Json::Value& config) -> void;
auto populateWindowRewriteConfig(const Json::Value& config) -> void; auto populateWindowRewriteConfig(const Json::Value& config) -> void;

View File

@ -577,9 +577,9 @@ auto Workspaces::parseConfig(const Json::Value &config) -> void {
populateBoolConfig(config, "active-only", m_activeOnly); populateBoolConfig(config, "active-only", m_activeOnly);
populateBoolConfig(config, "move-to-monitor", m_moveToMonitor); populateBoolConfig(config, "move-to-monitor", m_moveToMonitor);
m_persistentWorkspaceConfig = config.get("persistent-workspaces", Json::Value());
populateSortByConfig(config); populateSortByConfig(config);
populateIgnoreWorkspacesConfig(config); populateIgnoreWorkspacesConfig(config);
populatePersistentWorkspacesConfig(config);
populateFormatWindowSeparatorConfig(config); populateFormatWindowSeparatorConfig(config);
populateWindowRewriteConfig(config); populateWindowRewriteConfig(config);
} }
@ -591,8 +591,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void {
m_iconsMap.emplace("", ""); m_iconsMap.emplace("", "");
} }
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member)
bool &member) -> void { -> void {
auto configValue = config[key]; auto configValue = config[key];
if (configValue.isBool()) { if (configValue.isBool()) {
member = configValue.asBool(); member = configValue.asBool();
@ -632,15 +632,6 @@ auto Workspaces::populateIgnoreWorkspacesConfig(const Json::Value &config) -> vo
} }
} }
auto Workspaces::populatePersistentWorkspacesConfig(const Json::Value &config) -> void {
if (config.isMember("persistent-workspaces") || config.isMember("persistent_workspaces")) {
spdlog::warn(
"persistent_workspaces is deprecated. Please change config to use persistent-workspaces.");
m_persistentWorkspaceConfig =
config.get("persistent-workspaces", config.get("persistent_workspaces", Json::Value()));
}
}
auto Workspaces::populateFormatWindowSeparatorConfig(const Json::Value &config) -> void { auto Workspaces::populateFormatWindowSeparatorConfig(const Json::Value &config) -> void {
auto formatWindowSeparator = config["format-window-separator"]; auto formatWindowSeparator = config["format-window-separator"];
m_formatWindowSeparator = m_formatWindowSeparator =