diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-04-04 14:49:58 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-04-04 14:50:03 +0100 |
| commit | 7d9977d02815d3111b8cb97da4695d1c39f4d808 (patch) | |
| tree | 9e242ccc4830b0992b6c9d477d668f47c4f69131 /src/config | |
| parent | 882be7765b820d075bbeecde12695f1696f577cf (diff) | |
debug: added manual_crash
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/ConfigManager.cpp | 10 | ||||
| -rw-r--r-- | src/config/ConfigManager.hpp | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 2c77694f..7c626002 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -97,6 +97,7 @@ void CConfigManager::setDefaultVars() { configValues["debug:disable_time"].intValue = 1; configValues["debug:enable_stdout_logs"].intValue = 0; configValues["debug:damage_tracking"].intValue = DAMAGE_TRACKING_FULL; + configValues["debug:manual_crash"].intValue = 0; configValues["decoration:rounding"].intValue = 0; configValues["decoration:blur"].intValue = 1; @@ -1397,6 +1398,15 @@ void CConfigManager::loadConfigLoadVars() { // update layout g_pLayoutManager->switchToLayout(configValues["general:layout"].strValue); + // manual crash + if (configValues["debug:manual_crash"].intValue && !m_bManualCrashInitiated) { + m_bManualCrashInitiated = true; + g_pHyprNotificationOverlay->addNotification("Manual crash has been set up. Set debug:manual_crash back to 0 in order to crash the compositor.", CColor(0), 5000, ICON_INFO); + } else if (m_bManualCrashInitiated && !configValues["debug:manual_crash"].intValue) { + // cowabunga it is + g_pHyprRenderer->initiateManualCrash(); + } + Debug::disableStdout = !configValues["debug:enable_stdout_logs"].intValue; for (auto& m : g_pCompositor->m_vMonitors) { diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index eb8998e1..cee6075e 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -213,7 +213,8 @@ class CConfigManager { std::deque<SLayerRule> m_dLayerRules; std::deque<std::string> m_dBlurLSNamespaces; - bool firstExecDispatched = false; + bool firstExecDispatched = false; + bool m_bManualCrashInitiated = false; std::deque<std::string> firstExecRequests; std::vector<std::pair<std::string, std::string>> environmentVariables; |
