diff options
| author | shezdy <77217897+shezdy@users.noreply.github.com> | 2026-04-30 13:10:03 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-30 20:10:03 +0100 |
| commit | 546cc71565cd2ccd9277febb14dcebf513ace623 (patch) | |
| tree | fe0cbe8e7e415f77158965cd11925572efc30fb7 /src/debug/HyprCtl.cpp | |
| parent | bac49db9a11d5398963f4ad3265a577f8e94dc66 (diff) | |
config/workspace-rules: support modifying persistent and monitor (#14217)
* workspace rules: support modifying persistent and monitor
* support modifying isDefault
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index b334a26e..11171472 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -507,8 +507,8 @@ static std::string getWorkspaceRuleData(const Config::CWorkspaceRule& r, eHyprCt const auto boolToString = [](const bool b) -> std::string { return b ? "true" : "false"; }; if (format == eHyprCtlOutputFormat::FORMAT_JSON) { const std::string monitor = r.m_monitor.empty() ? "" : std::format(",\n \"monitor\": \"{}\"", escapeJSONStrings(r.m_monitor)); - const std::string default_ = sc<bool>(r.m_isDefault) ? std::format(",\n \"default\": {}", boolToString(r.m_isDefault)) : ""; - const std::string persistent = sc<bool>(r.m_isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.m_isPersistent)) : ""; + const std::string default_ = sc<bool>(r.m_isDefault) ? std::format(",\n \"default\": {}", boolToString(r.m_isDefault.value())) : ""; + const std::string persistent = sc<bool>(r.m_isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.m_isPersistent.value())) : ""; const std::string gapsIn = sc<bool>(r.m_gapsIn) ? std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.m_gapsIn.value().m_top, r.m_gapsIn.value().m_right, r.m_gapsIn.value().m_bottom, r.m_gapsIn.value().m_left) : ""; @@ -531,8 +531,8 @@ static std::string getWorkspaceRuleData(const Config::CWorkspaceRule& r, eHyprCt return result; } else { const std::string monitor = std::format("\tmonitor: {}\n", r.m_monitor.empty() ? "<unset>" : escapeJSONStrings(r.m_monitor)); - const std::string default_ = std::format("\tdefault: {}\n", sc<bool>(r.m_isDefault) ? boolToString(r.m_isDefault) : "<unset>"); - const std::string persistent = std::format("\tpersistent: {}\n", sc<bool>(r.m_isPersistent) ? boolToString(r.m_isPersistent) : "<unset>"); + const std::string default_ = std::format("\tdefault: {}\n", sc<bool>(r.m_isDefault) ? boolToString(r.m_isDefault.value()) : "<unset>"); + const std::string persistent = std::format("\tpersistent: {}\n", sc<bool>(r.m_isPersistent) ? boolToString(r.m_isPersistent.value()) : "<unset>"); const std::string gapsIn = sc<bool>(r.m_gapsIn) ? std::format("\tgapsIn: {} {} {} {}\n", std::to_string(r.m_gapsIn.value().m_top), std::to_string(r.m_gapsIn.value().m_right), std::to_string(r.m_gapsIn.value().m_bottom), std::to_string(r.m_gapsIn.value().m_left)) : |
