summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-01-11 23:58:05 +0800
committerGitHub <noreply@github.com>2025-01-11 15:58:05 +0000
commit3b85690aa6d9c14bb926692e25cc4480b85200ab (patch)
tree481cf8f136a61aeb5429280e8dccd240cbf99668 /src/config/ConfigManager.hpp
parentcef09fbfe6624d2133d81be863bd48bcfc5939d3 (diff)
config: add exec(-onec) with rules and execr(-once) (#8953)
Diffstat (limited to 'src/config/ConfigManager.hpp')
-rw-r--r--src/config/ConfigManager.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp
index 53772401..a27ee7ab 100644
--- a/src/config/ConfigManager.hpp
+++ b/src/config/ConfigManager.hpp
@@ -132,6 +132,11 @@ struct SConfigOptionDescription {
std::variant<SBoolData, SRangeData, SFloatData, SStringData, SColorData, SChoiceData, SGradientData, SVectorData> data;
};
+struct SFirstExecRequest {
+ std::string exec = "";
+ bool withRules = false;
+};
+
class CConfigManager {
public:
CConfigManager();
@@ -196,7 +201,9 @@ class CConfigManager {
// keywords
std::optional<std::string> handleRawExec(const std::string&, const std::string&);
+ std::optional<std::string> handleExec(const std::string&, const std::string&);
std::optional<std::string> handleExecOnce(const std::string&, const std::string&);
+ std::optional<std::string> handleExecRawOnce(const std::string&, const std::string&);
std::optional<std::string> handleExecShutdown(const std::string&, const std::string&);
std::optional<std::string> handleMonitor(const std::string&, const std::string&);
std::optional<std::string> handleBind(const std::string&, const std::string&);
@@ -280,7 +287,8 @@ class CConfigManager {
bool firstExecDispatched = false;
bool m_bManualCrashInitiated = false;
- std::vector<std::string> firstExecRequests;
+
+ std::vector<SFirstExecRequest> firstExecRequests; // bool is for if with rules
std::vector<std::string> finalExecRequests;
std::vector<std::pair<std::string, std::string>> m_vFailedPluginConfigValues; // for plugin values of unloaded plugins