diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-03 18:39:20 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-03 18:41:38 +0000 |
| commit | 063708df26e8b930f492200e1907eb47950f50e6 (patch) | |
| tree | 31648b7148213ecb9c6d469148ac1c5061835d5a /src/debug/HyprCtl.cpp | |
| parent | 8ccbd272cc5f3a98280d4e050f456d25aee47ee5 (diff) | |
config: improve config value infrastructure
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index a65533d2..acc399b6 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -15,6 +15,8 @@ #include <string> #include <typeindex> +#include "../config/ConfigValue.hpp" + static void trimTrailingComma(std::string& str) { if (!str.empty() && str.back() == ',') str.pop_back(); @@ -879,7 +881,7 @@ std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) { g_pInputManager->setTabletConfigs(); // update tablets } - static auto* const PLAYOUT = (Hyprlang::STRING const*)g_pConfigManager->getConfigValuePtr("general:layout"); + static auto PLAYOUT = CConfigValue<std::string>("general:layout"); if (COMMAND.contains("general:layout")) g_pLayoutManager->switchToLayout(*PLAYOUT); // update layout @@ -1564,7 +1566,7 @@ std::string CHyprCtl::getReply(std::string request) { g_pInputManager->setTouchDeviceConfigs(); // update touch device cfgs g_pInputManager->setTabletConfigs(); // update tablets - static auto* const PLAYOUT = (Hyprlang::STRING const*)g_pConfigManager->getConfigValuePtr("general:layout"); + static auto PLAYOUT = CConfigValue<std::string>("general:layout"); g_pLayoutManager->switchToLayout(*PLAYOUT); // update layout |
