summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-20 13:52:37 -0400
committerGitHub <noreply@github.com>2026-03-20 17:52:37 +0000
commit8726a7363eb9213235e6e23657668e0daac39a5b (patch)
tree42eeb40f6f81a9ccec1455f308e56173e9dcce4b /src/helpers/MiscFunctions.cpp
parentb940b0d2c197841b0f648598ee782dbaf9e0a89b (diff)
config: cleanup the entire config infrastructure (#13785)
Massively refactors the config infrastructure, sorely needed and will be req'd for the lua stuff
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 34b06c2e..f79cad31 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -6,7 +6,7 @@
#include "../desktop/state/FocusState.hpp"
#include "../desktop/history/WorkspaceHistoryTracker.hpp"
#include "Monitor.hpp"
-#include "../config/ConfigManager.hpp"
+#include "../config/shared/workspace/WorkspaceRuleManager.hpp"
#include "fs/FsUtils.hpp"
#include <optional>
#include <cstring>
@@ -25,6 +25,7 @@
#include <execinfo.h>
#endif
#include <hyprutils/string/String.hpp>
+#include <hyprutils/string/VarList.hpp>
#include <hyprutils/os/Process.hpp>
#include "../version.h"
@@ -156,10 +157,10 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) {
std::set<WORKSPACEID> invalidWSes;
if (same_mon) {
- for (auto const& rule : g_pConfigManager->getAllWorkspaceRules()) {
- const auto PMONITOR = g_pCompositor->getMonitorFromString(rule.monitor);
+ for (auto const& rule : Config::workspaceRuleMgr()->getAllWorkspaceRules()) {
+ const auto PMONITOR = g_pCompositor->getMonitorFromString(rule.m_monitor);
if (PMONITOR && (PMONITOR->m_id != Desktop::focusState()->monitor()->m_id))
- invalidWSes.insert(rule.workspaceId);
+ invalidWSes.insert(rule.m_workspaceId);
}
}
@@ -235,14 +236,14 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) {
invalidWSes.insert(ws->m_id);
}
}
- for (auto const& rule : g_pConfigManager->getAllWorkspaceRules()) {
- const auto PMONITOR = g_pCompositor->getMonitorFromString(rule.monitor);
+ for (auto const& rule : Config::workspaceRuleMgr()->getAllWorkspaceRules()) {
+ const auto PMONITOR = g_pCompositor->getMonitorFromString(rule.m_monitor);
if (!PMONITOR || PMONITOR->m_id == Desktop::focusState()->monitor()->m_id) {
// Can't be invalid
continue;
}
// WS is bound to another monitor, can't jump to this
- invalidWSes.insert(rule.workspaceId);
+ invalidWSes.insert(rule.m_workspaceId);
}
// Prepare all named workspaces in case when we need them