summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-08-14 23:26:18 +0200
committervaxerski <vaxry@vaxry.net>2022-08-14 23:26:18 +0200
commitf0fe0c25d6474a852e1d7f1af62b7854ac461af6 (patch)
tree7a1844eef0a77d409829dcd27ae5cd5112adfcf6 /src
parentd906617fb681bd665d6ede26ba27f51046496e8e (diff)
added config-only to hyprctl reload
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp6
-rw-r--r--src/config/ConfigManager.hpp1
-rw-r--r--src/debug/HyprCtl.cpp13
3 files changed, 16 insertions, 4 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 9f38f16b..a640a4d5 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1079,7 +1079,8 @@ void CConfigManager::loadConfigLoadVars() {
// Set the modes for all monitors as we configured them
// not on first launch because monitors might not exist yet
// and they'll be taken care of in the newMonitor event
- if (!isFirstLaunch) {
+ // ignore if nomonitorreload is set
+ if (!isFirstLaunch && !m_bNoMonitorReload) {
m_bWantsMonitorReload = true;
// check
@@ -1099,6 +1100,9 @@ void CConfigManager::loadConfigLoadVars() {
// Force the compositor to fully re-render all monitors
for (auto& m : g_pCompositor->m_vMonitors)
m->forceFullFrames = 2;
+
+ // Reset no monitor reload
+ m_bNoMonitorReload = false;
}
void CConfigManager::tick() {
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp
index a4e4091b..87cbd956 100644
--- a/src/config/ConfigManager.hpp
+++ b/src/config/ConfigManager.hpp
@@ -97,6 +97,7 @@ public:
void performMonitorReload();
bool m_bWantsMonitorReload = false;
bool m_bForceReload = false;
+ bool m_bNoMonitorReload = false;
void ensureDPMS();
std::string parseKeyword(const std::string&, const std::string&, bool dynamic = false);
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index b0d0d86d..21f4e23d 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -505,9 +505,16 @@ std::string dispatchKeyword(std::string in) {
return retval;
}
-std::string reloadRequest() {
+std::string reloadRequest(std::string request) {
+
+ const auto REQMODE = request.substr(request.find_last_of(' ') + 1);
+
g_pConfigManager->m_bForceReload = true;
+ if (REQMODE == "config-only") {
+ g_pConfigManager->m_bNoMonitorReload = true;
+ }
+
return "ok";
}
@@ -681,8 +688,8 @@ std::string getReply(std::string request) {
return layersRequest(format);
else if (request == "version")
return versionRequest(format);
- else if (request == "reload")
- return reloadRequest();
+ else if (request.find("reload") == 0)
+ return reloadRequest(request);
else if (request == "devices")
return devicesRequest(format);
else if (request == "splash")