Skip to content

Commit

Permalink
env: add HYPRLAND_NO_RT
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Nov 17, 2023
1 parent a903dba commit 483302a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/helpers/MiscFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,10 @@ int64_t configStringToInt(const std::string& VALUE) {
} else if (VALUE.starts_with("false") || VALUE.starts_with("off") || VALUE.starts_with("no")) {
return 0;
}

if (VALUE.empty() || !isNumber(VALUE))
return 0;

return std::stoll(VALUE);
}

Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ int main(int argc, char** argv) {

g_pCompositor->initServer();

Init::gainRealTime();
if (!getenv("HYPRLAND_NO_RT") || configStringToInt(std::string(getenv("HYPRLAND_NO_RT"))) == 0)
Init::gainRealTime();

Debug::log(LOG, "Hyprland init finished.");

Expand Down

0 comments on commit 483302a

Please sign in to comment.