mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:25:58 +01:00
configmanager: deprecate bindws
This commit is contained in:
parent
a5d63a0324
commit
7b73a332ea
2 changed files with 5 additions and 25 deletions
|
@ -1135,16 +1135,7 @@ void CConfigManager::handleSource(const std::string& command, const std::string&
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigManager::handleBindWS(const std::string& command, const std::string& value) {
|
void CConfigManager::handleBindWS(const std::string& command, const std::string& value) {
|
||||||
const auto ARGS = CVarList(value);
|
parseError = "bindws has been deprecated in favor of workspace rules, see the wiki -> workspace rules";
|
||||||
|
|
||||||
const auto FOUND = std::find_if(boundWorkspaces.begin(), boundWorkspaces.end(), [&](const auto& other) { return other.first == ARGS[0]; });
|
|
||||||
|
|
||||||
if (FOUND != boundWorkspaces.end()) {
|
|
||||||
FOUND->second = ARGS[1];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boundWorkspaces.push_back({ARGS[0], ARGS[1]});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigManager::handleEnv(const std::string& command, const std::string& value) {
|
void CConfigManager::handleEnv(const std::string& command, const std::string& value) {
|
||||||
|
@ -1380,7 +1371,6 @@ void CConfigManager::loadConfigLoadVars() {
|
||||||
configDynamicVars.clear();
|
configDynamicVars.clear();
|
||||||
deviceConfigs.clear();
|
deviceConfigs.clear();
|
||||||
m_dBlurLSNamespaces.clear();
|
m_dBlurLSNamespaces.clear();
|
||||||
boundWorkspaces.clear();
|
|
||||||
m_dWorkspaceRules.clear();
|
m_dWorkspaceRules.clear();
|
||||||
setDefaultAnimationVars(); // reset anims
|
setDefaultAnimationVars(); // reset anims
|
||||||
m_vDeclaredPlugins.clear();
|
m_vDeclaredPlugins.clear();
|
||||||
|
@ -2021,23 +2011,15 @@ void CConfigManager::addParseError(const std::string& err) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CMonitor* CConfigManager::getBoundMonitorForWS(const std::string& wsname) {
|
CMonitor* CConfigManager::getBoundMonitorForWS(const std::string& wsname) {
|
||||||
for (auto& [ws, mon] : boundWorkspaces) {
|
return g_pCompositor->getMonitorFromName(getBoundMonitorStringForWS(wsname));
|
||||||
const auto WSNAME = ws.find("name:") == 0 ? ws.substr(5) : ws;
|
|
||||||
|
|
||||||
if (WSNAME == wsname) {
|
|
||||||
return g_pCompositor->getMonitorFromString(mon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CConfigManager::getBoundMonitorStringForWS(const std::string& wsname) {
|
std::string CConfigManager::getBoundMonitorStringForWS(const std::string& wsname) {
|
||||||
for (auto& [ws, mon] : boundWorkspaces) {
|
for (auto& wr : m_dWorkspaceRules) {
|
||||||
const auto WSNAME = ws.find("name:") == 0 ? ws.substr(5) : ws;
|
const auto WSNAME = wr.workspaceName.find("name:") == 0 ? wr.workspaceName.substr(5) : wr.workspaceName;
|
||||||
|
|
||||||
if (WSNAME == wsname) {
|
if (WSNAME == wsname) {
|
||||||
return mon;
|
return wr.monitor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,8 +217,6 @@ class CConfigManager {
|
||||||
|
|
||||||
std::string m_szCurrentSubmap = ""; // For storing the current keybind submap
|
std::string m_szCurrentSubmap = ""; // For storing the current keybind submap
|
||||||
|
|
||||||
std::vector<std::pair<std::string, std::string>> boundWorkspaces;
|
|
||||||
|
|
||||||
std::vector<SExecRequestedRule> execRequestedRules; // rules requested with exec, e.g. [workspace 2] kitty
|
std::vector<SExecRequestedRule> execRequestedRules; // rules requested with exec, e.g. [workspace 2] kitty
|
||||||
|
|
||||||
std::vector<std::string> m_vDeclaredPlugins;
|
std::vector<std::string> m_vDeclaredPlugins;
|
||||||
|
|
Loading…
Reference in a new issue