diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-21 22:47:27 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-21 22:47:27 +0200 |
| commit | 5541098f2026daed21d87fdaa5c85d8329c8cfbc (patch) | |
| tree | 9d4a0192a10110fd0dff7f0b265ee7282ef5b5c9 /src/config | |
| parent | 48e33023afdd8e1683f275058d0a4148a41f5de4 (diff) | |
Added bindl
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/ConfigManager.cpp | 5 | ||||
| -rw-r--r-- | src/config/ConfigManager.hpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index b76ab965..2abbdcc4 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -415,7 +415,7 @@ void CConfigManager::handleAnimation(const std::string& command, const std::stri configSetValueSafe("animations:" + ANIMNAME + "_style", curitem); } -void CConfigManager::handleBind(const std::string& command, const std::string& value) { +void CConfigManager::handleBind(const std::string& command, const std::string& value, bool locked) { // example: // bind=SUPER,G,exec,dmenu_run <args> @@ -448,7 +448,7 @@ void CConfigManager::handleBind(const std::string& command, const std::string& v } if (KEY != "") - g_pKeybindManager->addKeybind(SKeybind{KEY, MOD, HANDLER, COMMAND}); + g_pKeybindManager->addKeybind(SKeybind{KEY, MOD, HANDLER, COMMAND, locked}); } void CConfigManager::handleUnbind(const std::string& command, const std::string& value) { @@ -578,6 +578,7 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std:: } else if (COMMAND == "monitor") handleMonitor(COMMAND, VALUE); else if (COMMAND == "bind") handleBind(COMMAND, VALUE); + else if (COMMAND == "bindl") handleBind(COMMAND, VALUE, true); else if (COMMAND == "unbind") handleUnbind(COMMAND, VALUE); else if (COMMAND == "workspace") handleDefaultWorkspace(COMMAND, VALUE); else if (COMMAND == "windowrule") handleWindowRule(COMMAND, VALUE); diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 0d4386c1..407ccce4 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -106,7 +106,7 @@ private: void configSetValueSafe(const std::string&, const std::string&); void handleRawExec(const std::string&, const std::string&); void handleMonitor(const std::string&, const std::string&); - void handleBind(const std::string&, const std::string&); + void handleBind(const std::string&, const std::string&, bool locked = false); void handleUnbind(const std::string&, const std::string&); void handleWindowRule(const std::string&, const std::string&); void handleDefaultWorkspace(const std::string&, const std::string&); |
