core: replace grace option with --grace cli argument#802
Merged
PointerDilemma merged 6 commits intohyprwm:mainfrom Jun 26, 2025
davc0n:main
Merged
core: replace grace option with --grace cli argument#802PointerDilemma merged 6 commits intohyprwm:mainfrom davc0n:main
PointerDilemma merged 6 commits intohyprwm:mainfrom
davc0n:main
Conversation
not necessary anymore, grace is not a configuration option
Closed
Collaborator
|
Ok, sorry this is also not entirely it, because it breaks Use this patch: diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 20d4941..00365d7 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -214,7 +214,6 @@ void CConfigManager::init() {
m_config.addConfigValue("general:text_trim", Hyprlang::INT{1});
m_config.addConfigValue("general:hide_cursor", Hyprlang::INT{0});
- m_config.addConfigValue("general:grace", Hyprlang::INT{0});
m_config.addConfigValue("general:ignore_empty_input", Hyprlang::INT{0});
m_config.addConfigValue("general:immediate_render", Hyprlang::INT{0});
m_config.addConfigValue("general:fractional_scaling", Hyprlang::INT{2});
diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp
index 337f43d..dc23a4c 100644
--- a/src/core/hyprlock.cpp
+++ b/src/core/hyprlock.cpp
@@ -43,15 +43,8 @@ CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediateRender, c
g_pEGL = makeUnique<CEGL>(m_sWaylandState.display);
- static const auto GRACE = g_pConfigManager->getValue<Hyprlang::INT>("general:grace");
- if (*GRACE > 0) {
- Debug::log(WARN, "\"general:grace\" config option is deprecated. It will be removed in an upcoming release. Use the \"--grace\" option instead.");
- }
-
if (graceSeconds > 0)
m_tGraceEnds = std::chrono::system_clock::now() + std::chrono::seconds(graceSeconds);
- else if (*GRACE > 0)
- m_tGraceEnds = std::chrono::system_clock::now() + std::chrono::seconds(*GRACE);
else
m_tGraceEnds = std::chrono::system_clock::from_time_t(0);
diff --git a/src/main.cpp b/src/main.cpp
index 484aea1..d71a59a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -94,7 +94,7 @@ int main(int argc, char** argv, char** envp) {
} else if (arg == "--immediate") {
graceSeconds = 0;
- Debug::log(WARN, "\"--immediate\" is deprecated. It will be removed in an upcoming release. Use the \"--grace\" option instead.");
+ Debug::log(WARN, R"("--immediate" is deprecated. Use the "--grace" option instead.)");
}
else if (arg == "--immediate-render")With this the transition behavior should be like this:
|
Collaborator
|
Ups, forgot the wiki MR. |
khaneliman
added a commit
to khaneliman/khanelinix
that referenced
this pull request
Jul 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref #782