mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-11-27 00:16:00 +03:00
added config-only to hyprctl reload
This commit is contained in:
parent
d906617fb6
commit
f0fe0c25d6
@ -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() {
|
||||
|
@ -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);
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user