File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -990,12 +990,34 @@ std::string CConfigManager::getErrors() {
990990 return m_configErrors;
991991}
992992
993+ static std::vector<const char *> HL_VERSION_VARS = {
994+ " HYPRLAND_V_0_53" ,
995+ };
996+
997+ static void exportHlVersionVars () {
998+ for (const auto & v : HL_VERSION_VARS) {
999+ setenv (v, " 1" , 1 );
1000+ }
1001+ }
1002+
1003+ static void clearHlVersionVars () {
1004+ for (const auto & v : HL_VERSION_VARS) {
1005+ unsetenv (v);
1006+ }
1007+ }
1008+
9931009void CConfigManager::reload () {
9941010 EMIT_HOOK_EVENT (" preConfigReload" , nullptr );
9951011 setDefaultAnimationVars ();
9961012 resetHLConfig ();
997- m_configCurrentPath = getMainConfigPath ();
998- const auto ERR = m_config->parse ();
1013+ m_configCurrentPath = getMainConfigPath ();
1014+
1015+ exportHlVersionVars ();
1016+
1017+ const auto ERR = m_config->parse ();
1018+
1019+ clearHlVersionVars ();
1020+
9991021 const auto monitorError = handleMonitorv2 ();
10001022 const auto ruleError = reloadRules ();
10011023 m_lastConfigVerificationWasSuccessful = !ERR.error && !monitorError.error ;
You can’t perform that action at this time.
0 commit comments