summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-26 15:16:36 +0100
committerGitHub <noreply@github.com>2026-04-26 15:16:36 +0100
commit5ba33f846129f3e6c0505b19f94634b24505e828 (patch)
treeaaacabe678006040c342935481a86607c66607fd /src/render
parent329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff)
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/GLRenderer.cpp2
-rw-r--r--src/render/OpenGL.cpp50
-rw-r--r--src/render/Renderer.cpp107
-rw-r--r--src/render/ShaderLoader.cpp2
-rw-r--r--src/render/decorations/CHyprBorderDecoration.cpp2
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp12
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp140
-rw-r--r--src/render/pass/Pass.cpp8
8 files changed, 162 insertions, 161 deletions
diff --git a/src/render/GLRenderer.cpp b/src/render/GLRenderer.cpp
index 129295ac..35aca7db 100644
--- a/src/render/GLRenderer.cpp
+++ b/src/render/GLRenderer.cpp
@@ -83,7 +83,7 @@ bool CHyprGLRenderer::beginRenderInternal(PHLMONITOR pMonitor, CRegion& damage,
void CHyprGLRenderer::endRender(const std::function<void()>& renderingDoneCallback) {
const auto PMONITOR = g_pHyprRenderer->m_renderData.pMonitor;
- static auto PNVIDIAANTIFLICKER = CConfigValue<Hyprlang::INT>("opengl:nvidia_anti_flicker");
+ static auto PNVIDIAANTIFLICKER = CConfigValue<Config::INTEGER>("opengl:nvidia_anti_flicker");
g_pHyprRenderer->m_renderData.damage = m_renderPass.render(g_pHyprRenderer->m_renderData.damage);
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index bf914e31..a87ec2ee 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -315,7 +315,7 @@ CHyprOpenGLImpl::CHyprOpenGLImpl() : m_drmFD(g_pCompositor->m_drmRenderNode.fd >
loadGLProc(&m_proc.eglQueryDisplayAttribEXT, "eglQueryDisplayAttribEXT");
}
- static const auto GLDEBUG = CConfigValue<Hyprlang::INT>("debug:gl_debugging");
+ static const auto GLDEBUG = CConfigValue<Config::INTEGER>("debug:gl_debugging");
if (EGLEXTENSIONS.contains("EGL_KHR_debug") && *GLDEBUG) {
loadGLProc(&m_proc.eglDebugMessageControlKHR, "eglDebugMessageControlKHR");
static const EGLAttrib debugAttrs[] = {
@@ -781,8 +781,8 @@ void CHyprOpenGLImpl::begin(PHLMONITOR pMonitor, const CRegion& damage_, SP<IFra
}
void CHyprOpenGLImpl::end() {
- static auto PZOOMDISABLEAA = CConfigValue<Hyprlang::INT>("cursor:zoom_disable_aa");
- static auto PFPINVALIDATE = CConfigValue<Hyprlang::INT>("debug:invalidate_fp16");
+ static auto PZOOMDISABLEAA = CConfigValue<Config::INTEGER>("cursor:zoom_disable_aa");
+ static auto PFPINVALIDATE = CConfigValue<Config::INTEGER>("debug:invalidate_fp16");
auto& m_renderData = g_pHyprRenderer->m_renderData;
const auto PMONITOR = m_renderData.pMonitor;
TRACY_GPU_ZONE("RenderEnd");
@@ -851,7 +851,7 @@ void CHyprOpenGLImpl::end() {
m_renderData.pMonitor.reset();
- static const auto GLDEBUG = CConfigValue<Hyprlang::INT>("debug:gl_debugging");
+ static const auto GLDEBUG = CConfigValue<Config::INTEGER>("debug:gl_debugging");
if (*GLDEBUG) {
// check for gl errors
@@ -875,7 +875,7 @@ const std::array<std::string, SH_FRAG_LAST> FRAG_SHADERS = {
bool CHyprOpenGLImpl::initShaders(const std::string& path) {
auto shaders = makeShared<SPreparedShaders>();
- static const auto PCM = CConfigValue<Hyprlang::INT>("render:cm_enabled");
+ static const auto PCM = CConfigValue<Config::INTEGER>("render:cm_enabled");
try {
auto shaderLoader = makeUnique<CShaderLoader>(SHADER_INCLUDES, FRAG_SHADERS, path);
@@ -904,7 +904,7 @@ bool CHyprOpenGLImpl::initShaders(const std::string& path) {
void CHyprOpenGLImpl::applyScreenShader(const std::string& path) {
- static auto PDT = CConfigValue<Hyprlang::INT>("debug:damage_tracking");
+ static auto PDT = CConfigValue<Config::INTEGER>("debug:damage_tracking");
m_finalScreenShader->destroy();
@@ -1201,8 +1201,8 @@ void CHyprOpenGLImpl::passCMUniforms(WP<CShader> shader, const PImageDescription
}
WP<CShader> CHyprOpenGLImpl::renderToOutputInternal() {
- static const auto PDT = CConfigValue<Hyprlang::INT>("debug:damage_tracking");
- static const auto PCURSORTIMEOUT = CConfigValue<Hyprlang::FLOAT>("cursor:inactive_timeout");
+ static const auto PDT = CConfigValue<Config::INTEGER>("debug:damage_tracking");
+ static const auto PCURSORTIMEOUT = CConfigValue<Config::FLOAT>("cursor:inactive_timeout");
auto& m_renderData = g_pHyprRenderer->m_renderData;
@@ -1274,8 +1274,8 @@ WP<CShader> CHyprOpenGLImpl::renderToOutputInternal() {
}
WP<CShader> CHyprOpenGLImpl::renderToFBInternal(SP<ITexture> tex, const STextureRenderData& data, eTextureType texType, const CBox& newBox) {
- static const auto PENABLECM = CConfigValue<Hyprlang::INT>("render:cm_enabled");
- static auto PBLEND = CConfigValue<Hyprlang::INT>("render:use_shader_blur_blend");
+ static const auto PENABLECM = CConfigValue<Config::INTEGER>("render:cm_enabled");
+ static auto PBLEND = CConfigValue<Config::INTEGER>("render:use_shader_blur_blend");
auto& m_renderData = g_pHyprRenderer->m_renderData;
@@ -1632,10 +1632,10 @@ SP<IFramebuffer> CHyprOpenGLImpl::blurFramebufferWithDamage(float a, CRegion* or
const auto& glMatrix = g_pHyprRenderer->projectBoxToTarget(MONITORBOX, TRANSFORM);
// get the config settings
- static auto PBLURSIZE = CConfigValue<Hyprlang::INT>("decoration:blur:size");
- static auto PBLURPASSES = CConfigValue<Hyprlang::INT>("decoration:blur:passes");
- static auto PBLURVIBRANCY = CConfigValue<Hyprlang::FLOAT>("decoration:blur:vibrancy");
- static auto PBLURVIBRANCYDARKNESS = CConfigValue<Hyprlang::FLOAT>("decoration:blur:vibrancy_darkness");
+ static auto PBLURSIZE = CConfigValue<Config::INTEGER>("decoration:blur:size");
+ static auto PBLURPASSES = CConfigValue<Config::INTEGER>("decoration:blur:passes");
+ static auto PBLURVIBRANCY = CConfigValue<Config::FLOAT>("decoration:blur:vibrancy");
+ static auto PBLURVIBRANCYDARKNESS = CConfigValue<Config::FLOAT>("decoration:blur:vibrancy_darkness");
const auto BLUR_PASSES = std::clamp(*PBLURPASSES, sc<int64_t>(1), sc<int64_t>(8));
@@ -1654,9 +1654,9 @@ SP<IFramebuffer> CHyprOpenGLImpl::blurFramebufferWithDamage(float a, CRegion* or
// Begin with base color adjustments - global brightness and contrast
// TODO: make this a part of the first pass maybe to save on a drawcall?
{
- static auto PBLURCONTRAST = CConfigValue<Hyprlang::FLOAT>("decoration:blur:contrast");
- static auto PBLURBRIGHTNESS = CConfigValue<Hyprlang::FLOAT>("decoration:blur:brightness");
- static auto PBLEND = CConfigValue<Hyprlang::INT>("render:use_shader_blur_blend");
+ static auto PBLURCONTRAST = CConfigValue<Config::FLOAT>("decoration:blur:contrast");
+ static auto PBLURBRIGHTNESS = CConfigValue<Config::FLOAT>("decoration:blur:brightness");
+ static auto PBLEND = CConfigValue<Config::INTEGER>("render:use_shader_blur_blend");
PMIRRORSWAPFB->bind();
@@ -1773,8 +1773,8 @@ SP<IFramebuffer> CHyprOpenGLImpl::blurFramebufferWithDamage(float a, CRegion* or
// finalize the image
{
- static auto PBLURNOISE = CConfigValue<Hyprlang::FLOAT>("decoration:blur:noise");
- static auto PBLURBRIGHTNESS = CConfigValue<Hyprlang::FLOAT>("decoration:blur:brightness");
+ static auto PBLURNOISE = CConfigValue<Config::FLOAT>("decoration:blur:noise");
+ static auto PBLURBRIGHTNESS = CConfigValue<Config::FLOAT>("decoration:blur:brightness");
if (currentRenderToFB == PMIRRORFB)
PMIRRORSWAPFB->bind();
@@ -1839,9 +1839,9 @@ SP<IFramebuffer> CHyprOpenGLImpl::blurFramebufferWithDamage(float a, CRegion* or
}
void CHyprOpenGLImpl::preRender(PHLMONITOR pMonitor) {
- static auto PBLURNEWOPTIMIZE = CConfigValue<Hyprlang::INT>("decoration:blur:new_optimizations");
- static auto PBLURXRAY = CConfigValue<Hyprlang::INT>("decoration:blur:xray");
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
+ static auto PBLURNEWOPTIMIZE = CConfigValue<Config::INTEGER>("decoration:blur:new_optimizations");
+ static auto PBLURXRAY = CConfigValue<Config::INTEGER>("decoration:blur:xray");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
if (!*PBLURNEWOPTIMIZE || !pMonitor->m_blurFBDirty || !*PBLUR)
return;
@@ -1927,7 +1927,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(SP<ITexture> tex, const CBox
TRACY_GPU_ZONE("RenderTextureWithBlur");
- static auto PBLEND = CConfigValue<Hyprlang::INT>("render:use_shader_blur_blend");
+ static auto PBLEND = CConfigValue<Config::INTEGER>("render:use_shader_blur_blend");
const auto NEEDS_STENCIL = data.discardMode != 0 && (!data.blockBlurOptimization || (data.discardMode & DISCARD_ALPHA));
if (!*PBLEND) {
@@ -1979,7 +1979,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(SP<ITexture> tex, const CBox
transformedBox.width / m_renderData.pMonitor->m_pixelSize.x * m_renderData.pMonitor->m_transformedSize.x,
transformedBox.height / m_renderData.pMonitor->m_pixelSize.y * m_renderData.pMonitor->m_transformedSize.y};
- static auto PBLURIGNOREOPACITY = CConfigValue<Hyprlang::INT>("decoration:blur:ignore_opacity");
+ static auto PBLURIGNOREOPACITY = CConfigValue<Config::INTEGER>("decoration:blur:ignore_opacity");
g_pHyprRenderer->pushMonitorTransformEnabled(true);
bool renderModif = g_pHyprRenderer->m_renderData.renderModif.enabled;
@@ -2228,7 +2228,7 @@ void CHyprOpenGLImpl::renderRoundedShadow(const CBox& box, int round, float roun
CBox newBox = box;
g_pHyprRenderer->m_renderData.renderModif.applyToBox(newBox);
- static auto PSHADOWPOWER = CConfigValue<Hyprlang::INT>("decoration:shadow:render_power");
+ static auto PSHADOWPOWER = CConfigValue<Config::INTEGER>("decoration:shadow:render_power");
const auto SHADOWPOWER = std::clamp(sc<int>(*PSHADOWPOWER), 1, 4);
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index a77e855d..fa1a8a06 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -178,7 +178,7 @@ IHyprRenderer::IHyprRenderer() {
m_renderUnfocusedTimer = makeShared<CEventLoopTimer>(
std::nullopt,
[this](SP<CEventLoopTimer> self, void* data) {
- static auto PFPS = CConfigValue<Hyprlang::INT>("misc:render_unfocused_fps");
+ static auto PFPS = CConfigValue<Config::INTEGER>("misc:render_unfocused_fps");
if (m_renderUnfocused.empty())
return;
@@ -540,7 +540,7 @@ void IHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, const T
const auto PWORKSPACE = pWindow->m_workspace;
const auto REALPOS = pWindow->m_realPosition->value() + (pWindow->m_pinned ? Vector2D{} : PWORKSPACE->m_renderOffset->value());
- static auto PDIMAROUND = CConfigValue<Hyprlang::FLOAT>("decoration:dim_around");
+ static auto PDIMAROUND = CConfigValue<Config::FLOAT>("decoration:dim_around");
CSurfacePassElement::SRenderData renderdata = {pMonitor, time};
CBox textureBox = {REALPOS.x, REALPOS.y, std::max(pWindow->m_realSize->value().x, 5.0), std::max(pWindow->m_realSize->value().y, 5.0)};
@@ -643,7 +643,7 @@ void IHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, const T
}
}
- static auto PXWLUSENN = CConfigValue<Hyprlang::INT>("xwayland:use_nearest_neighbor");
+ static auto PXWLUSENN = CConfigValue<Config::INTEGER>("xwayland:use_nearest_neighbor");
if ((pWindow->m_isX11 && *PXWLUSENN) || pWindow->m_ruleApplicator->nearestNeighbor().valueOrDefault())
renderdata.useNearestNeighbor = true;
@@ -713,7 +713,7 @@ void IHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, const T
renderdata.squishOversized = false; // don't squish popups
renderdata.popup = true;
- static CConfigValue PBLURIGNOREA = CConfigValue<Hyprlang::FLOAT>("decoration:blur:popups_ignorealpha");
+ static CConfigValue PBLURIGNOREA = CConfigValue<Config::FLOAT>("decoration:blur:popups_ignorealpha");
renderdata.blur = shouldBlur(pWindow->m_popupHead);
@@ -837,8 +837,8 @@ UP<CScopeGuard> IHyprRenderer::bindTempFB(SP<IFramebuffer> fb) {
}
bool IHyprRenderer::preBlurQueued(PHLMONITORREF pMonitor) {
- static auto PBLURNEWOPTIMIZE = CConfigValue<Hyprlang::INT>("decoration:blur:new_optimizations");
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
+ static auto PBLURNEWOPTIMIZE = CConfigValue<Config::INTEGER>("decoration:blur:new_optimizations");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
if (!pMonitor)
return false;
@@ -898,7 +898,7 @@ void IHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, const Time::s
(lockscreen && !pLayer->m_ruleApplicator->aboveLock().valueOrDefault()))
return;
- static auto PDIMAROUND = CConfigValue<Hyprlang::FLOAT>("decoration:dim_around");
+ static auto PDIMAROUND = CConfigValue<Config::FLOAT>("decoration:dim_around");
if (*PDIMAROUND && pLayer->m_ruleApplicator->dimAround().valueOrDefault() && !m_bRenderingSnapshot && !popups) {
CRectPassElement::SRectData data;
@@ -1001,9 +1001,9 @@ void IHyprRenderer::renderIMEPopup(CInputPopup* pPopup, PHLMONITOR pMonitor, con
renderdata.w = SURF->m_current.size.x;
renderdata.h = SURF->m_current.size.y;
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
- static auto PBLURIMES = CConfigValue<Hyprlang::INT>("decoration:blur:input_methods");
- static auto PBLURIGNOREA = CConfigValue<Hyprlang::FLOAT>("decoration:blur:input_methods_ignorealpha");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
+ static auto PBLURIMES = CConfigValue<Config::INTEGER>("decoration:blur:input_methods");
+ static auto PBLURIGNOREA = CConfigValue<Config::FLOAT>("decoration:blur:input_methods_ignorealpha");
renderdata.blur = *PBLURIMES && *PBLUR;
if (renderdata.blur) {
@@ -1057,11 +1057,11 @@ void IHyprRenderer::renderSessionLockSurface(WP<SSessionLockSurface> pSurface, P
}
void IHyprRenderer::renderAllClientsForWorkspace(PHLMONITOR pMonitor, PHLWORKSPACE pWorkspace, const Time::steady_tp& time, const Vector2D& translate, const float& scale) {
- static auto PDIMSPECIAL = CConfigValue<Hyprlang::FLOAT>("decoration:dim_special");
- static auto PBLURSPECIAL = CConfigValue<Hyprlang::INT>("decoration:blur:special");
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
- static auto PXPMODE = CConfigValue<Hyprlang::INT>("render:xp_mode");
- static auto PSESSIONLOCKXRAY = CConfigValue<Hyprlang::INT>("misc:session_lock_xray");
+ static auto PDIMSPECIAL = CConfigValue<Config::FLOAT>("decoration:dim_special");
+ static auto PBLURSPECIAL = CConfigValue<Config::INTEGER>("decoration:blur:special");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
+ static auto PXPMODE = CConfigValue<Config::INTEGER>("render:xp_mode");
+ static auto PSESSIONLOCKXRAY = CConfigValue<Config::INTEGER>("misc:session_lock_xray");
if UNLIKELY (!pMonitor)
return;
@@ -1243,15 +1243,15 @@ SP<ITexture> IHyprRenderer::getBackground(PHLMONITOR pMonitor) {
}
void IHyprRenderer::renderBackground(PHLMONITOR pMonitor) {
- static auto PRENDERTEX = CConfigValue<Hyprlang::INT>("misc:disable_hyprland_logo");
- static auto PBACKGROUNDCOLOR = CConfigValue<Hyprlang::INT>("misc:background_color");
- static auto PNOSPLASH = CConfigValue<Hyprlang::INT>("misc:disable_splash_rendering");
+ static auto PRENDERTEX = CConfigValue<Config::INTEGER>("misc:disable_hyprland_logo");
+ static auto PBACKGROUNDCOLOR = CConfigValue<Config::INTEGER>("misc:background_color");
+ static auto PNOSPLASH = CConfigValue<Config::INTEGER>("misc:disable_splash_rendering");
if (*PRENDERTEX /* inverted cfg flag */ || pMonitor->m_backgroundOpacity->isBeingAnimated())
m_renderPass.add(makeUnique<CClearPassElement>(CClearPassElement::SClearData{CHyprColor(*PBACKGROUNDCOLOR)}));
if (!*PRENDERTEX) {
- static auto PBACKGROUNDCOLOR = CConfigValue<Hyprlang::INT>("misc:background_color");
+ static auto PBACKGROUNDCOLOR = CConfigValue<Config::INTEGER>("misc:background_color");
if (!pMonitor->m_background)
pMonitor->m_background = getBackground(pMonitor);
@@ -1302,8 +1302,8 @@ void IHyprRenderer::requestBackgroundResource() {
if (m_backgroundResource)
return;
- static auto PNOWALLPAPER = CConfigValue<Hyprlang::INT>("misc:disable_hyprland_logo");
- static auto PFORCEWALLPAPER = CConfigValue<Hyprlang::INT>("misc:force_default_wallpaper");
+ static auto PNOWALLPAPER = CConfigValue<Config::INTEGER>("misc:disable_hyprland_logo");
+ static auto PFORCEWALLPAPER = CConfigValue<Config::INTEGER>("misc:force_default_wallpaper");
const auto FORCEWALLPAPER = std::clamp(*PFORCEWALLPAPER, sc<int64_t>(-1), sc<int64_t>(2));
@@ -1400,8 +1400,8 @@ SP<ITexture> IHyprRenderer::getBlurTexture(PHLMONITORREF pMonitor) {
}
bool IHyprRenderer::shouldUseNewBlurOptimizations(PHLLS pLayer, PHLWINDOW pWindow) {
- static auto PBLURNEWOPTIMIZE = CConfigValue<Hyprlang::INT>("decoration:blur:new_optimizations");
- static auto PBLURXRAY = CConfigValue<Hyprlang::INT>("decoration:blur:xray");
+ static auto PBLURNEWOPTIMIZE = CConfigValue<Config::INTEGER>("decoration:blur:new_optimizations");
+ static auto PBLURXRAY = CConfigValue<Config::INTEGER>("decoration:blur:xray");
if (!getBlurTexture(m_renderData.pMonitor))
return false;
@@ -1483,9 +1483,10 @@ SP<ITexture> IHyprRenderer::renderText(const std::string& text, CHyprColor col,
pango_layout_set_ellipsize(layoutText, PANGO_ELLIPSIZE_END);
}
- pango_layout_get_size(layoutText, &textW, &textH);
- textW /= PANGO_SCALE;
- textH /= PANGO_SCALE;
+ PangoRectangle rectInk = {}, rectLog = {};
+ pango_layout_get_pixel_extents(layoutText, &rectInk, &rectLog);
+ textW = std::max(rectLog.width, rectInk.x + rectInk.width);
+ textH = std::max(rectLog.height, rectInk.y + rectInk.height);
pango_font_description_free(pangoFD);
g_object_unref(layoutText);
@@ -1596,7 +1597,7 @@ void IHyprRenderer::renderLockscreen(PHLMONITOR pMonitor, const Time::steady_tp&
}
void IHyprRenderer::renderSessionLockPrimer(PHLMONITOR pMonitor) {
- static auto PSESSIONLOCKXRAY = CConfigValue<Hyprlang::INT>("misc:session_lock_xray");
+ static auto PSESSIONLOCKXRAY = CConfigValue<Config::INTEGER>("misc:session_lock_xray");
if (*PSESSIONLOCKXRAY)
return;
@@ -1904,11 +1905,11 @@ void IHyprRenderer::renderMonitor(PHLMONITOR pMonitor, bool commit) {
static std::chrono::high_resolution_clock::time_point renderStartOverlay = std::chrono::high_resolution_clock::now();
static std::chrono::high_resolution_clock::time_point endRenderOverlay = std::chrono::high_resolution_clock::now();
- static auto PDEBUGOVERLAY = CConfigValue<Hyprlang::INT>("debug:overlay");
- static auto PDAMAGETRACKINGMODE = CConfigValue<Hyprlang::INT>("debug:damage_tracking");
- static auto PDAMAGEBLINK = CConfigValue<Hyprlang::INT>("debug:damage_blink");
- static auto PSOLDAMAGE = CConfigValue<Hyprlang::INT>("debug:render_solitary_wo_damage");
- static auto PVFR = CConfigValue<Hyprlang::INT>("debug:vfr");
+ static auto PDEBUGOVERLAY = CConfigValue<Config::INTEGER>("debug:overlay");
+ static auto PDAMAGETRACKINGMODE = CConfigValue<Config::INTEGER>("debug:damage_tracking");
+ static auto PDAMAGEBLINK = CConfigValue<Config::INTEGER>("debug:damage_blink");
+ static auto PSOLDAMAGE = CConfigValue<Config::INTEGER>("debug:render_solitary_wo_damage");
+ static auto PVFR = CConfigValue<Config::INTEGER>("debug:vfr");
static int damageBlinkCleanup = 0; // because double-buffered
@@ -2210,10 +2211,10 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, S
}
void IHyprRenderer::handleFullscreenSettings(PHLMONITOR pMonitor) {
- static auto PCT = CConfigValue<Hyprlang::INT>("render:send_content_type");
- static auto PAUTOHDR = CConfigValue<Hyprlang::INT>("render:cm_auto_hdr");
- static auto PNONSHADER = CConfigValue<Hyprlang::INT>("render:non_shader_cm");
- static auto PNSINTEROP = CConfigValue<Hyprlang::INT>("render:non_shader_cm_interop");
+ static auto PCT = CConfigValue<Config::INTEGER>("render:send_content_type");
+ static auto PAUTOHDR = CConfigValue<Config::INTEGER>("render:cm_auto_hdr");
+ static auto PNONSHADER = CConfigValue<Config::INTEGER>("render:non_shader_cm");
+ static auto PNSINTEROP = CConfigValue<Config::INTEGER>("render:non_shader_cm_interop");
const bool configuredHDR = (pMonitor->m_cmType == NCMType::CM_HDR_EDID || pMonitor->m_cmType == NCMType::CM_HDR);
bool wantHDR = configuredHDR;
@@ -2628,7 +2629,7 @@ void IHyprRenderer::damageSurface(SP<CWLSurfaceResource> pSurface, double x, dou
m->addDamage(damageBoxForEach);
}
- static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
+ static auto PLOGDAMAGE = CConfigValue<Config::INTEGER>("debug:log_damage");
if (*PLOGDAMAGE)
Log::logger->log(Log::DEBUG, "Damage: Surface (extents): xy: {}, {} wh: {}, {}", damageBox.pixman()->extents.x1, damageBox.pixman()->extents.y1,
@@ -2653,7 +2654,7 @@ void IHyprRenderer::damageWindow(PHLWINDOW pWindow, bool forceFull) {
}
}
- static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
+ static auto PLOGDAMAGE = CConfigValue<Config::INTEGER>("debug:log_damage");
if (*PLOGDAMAGE)
Log::logger->log(Log::DEBUG, "Damage: Window ({}): xy: {}, {} wh: {}, {}", pWindow->m_title, windowBox.x, windowBox.y, windowBox.width, windowBox.height);
@@ -2666,7 +2667,7 @@ void IHyprRenderer::damageMonitor(PHLMONITOR pMonitor) {
CBox damageBox = {0, 0, INT16_MAX, INT16_MAX};
pMonitor->addDamage(damageBox);
- static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
+ static auto PLOGDAMAGE = CConfigValue<Config::INTEGER>("debug:log_damage");
if (*PLOGDAMAGE)
Log::logger->log(Log::DEBUG, "Damage: Monitor {}", pMonitor->m_name);
@@ -2686,7 +2687,7 @@ void IHyprRenderer::damageBox(const CBox& box, bool skipFrameSchedule) {
}
}
- static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
+ static auto PLOGDAMAGE = CConfigValue<Config::INTEGER>("debug:log_damage");
if (*PLOGDAMAGE)
Log::logger->log(Log::DEBUG, "Damage: Box: xy: {}, {} wh: {}, {}", box.x, box.y, box.w, box.h);
@@ -2795,11 +2796,11 @@ void IHyprRenderer::setCursorFromName(const std::string& name, bool force) {
}
void IHyprRenderer::ensureCursorRenderingMode() {
- static auto PINVISIBLE = CConfigValue<Hyprlang::INT>("cursor:invisible");
- static auto PCURSORTIMEOUT = CConfigValue<Hyprlang::FLOAT>("cursor:inactive_timeout");
- static auto PHIDEONTOUCH = CConfigValue<Hyprlang::INT>("cursor:hide_on_touch");
- static auto PHIDEONTABLET = CConfigValue<Hyprlang::INT>("cursor:hide_on_tablet");
- static auto PHIDEONKEY = CConfigValue<Hyprlang::INT>("cursor:hide_on_key_press");
+ static auto PINVISIBLE = CConfigValue<Config::INTEGER>("cursor:invisible");
+ static auto PCURSORTIMEOUT = CConfigValue<Config::FLOAT>("cursor:inactive_timeout");
+ static auto PHIDEONTOUCH = CConfigValue<Config::INTEGER>("cursor:hide_on_touch");
+ static auto PHIDEONTABLET = CConfigValue<Config::INTEGER>("cursor:hide_on_tablet");
+ static auto PHIDEONKEY = CConfigValue<Config::INTEGER>("cursor:hide_on_key_press");
if (*PCURSORTIMEOUT <= 0)
m_cursorHiddenConditions.hiddenOnTimeout = false;
@@ -2953,7 +2954,7 @@ bool IHyprRenderer::isMgpu() {
}
void IHyprRenderer::addWindowToRenderUnfocused(PHLWINDOW window) {
- static auto PFPS = CConfigValue<Hyprlang::INT>("misc:render_unfocused_fps");
+ static auto PFPS = CConfigValue<Config::INTEGER>("misc:render_unfocused_fps");
if (*PFPS <= 0)
return;
@@ -3114,7 +3115,7 @@ void IHyprRenderer::makeSnapshot(WP<Desktop::View::CPopup> popup) {
}
void IHyprRenderer::renderSnapshot(PHLWINDOW pWindow) {
- static auto PDIMAROUND = CConfigValue<Hyprlang::FLOAT>("decoration:dim_around");
+ static auto PDIMAROUND = CConfigValue<Config::FLOAT>("decoration:dim_around");
PHLWINDOWREF ref{pWindow};
@@ -3219,7 +3220,7 @@ void IHyprRenderer::renderSnapshot(WP<Desktop::View::CPopup> popup) {
if (!popup->m_snapshotFB)
return;
- static CConfigValue PBLURIGNOREA = CConfigValue<Hyprlang::FLOAT>("decoration:blur:popups_ignorealpha");
+ static CConfigValue PBLURIGNOREA = CConfigValue<Config::FLOAT>("decoration:blur:popups_ignorealpha");
const auto FBDATA = popup->m_snapshotFB;
@@ -3269,7 +3270,7 @@ bool IHyprRenderer::shouldBlur(PHLLS ls) {
if (m_bRenderingSnapshot)
return false;
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
return *PBLUR && ls->m_ruleApplicator->blur().valueOrDefault();
}
@@ -3277,21 +3278,21 @@ bool IHyprRenderer::shouldBlur(PHLWINDOW w) {
if (m_bRenderingSnapshot)
return false;
- static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
const bool DONT_BLUR = w->m_ruleApplicator->noBlur().valueOrDefault() || w->m_ruleApplicator->RGBX().valueOrDefault() || w->opaque();
return *PBLUR && !DONT_BLUR;
}
bool IHyprRenderer::shouldBlur(WP<Desktop::View::CPopup> p) {
- static CConfigValue PBLURPOPUPS = CConfigValue<Hyprlang::INT>("decoration:blur:popups");
- static CConfigValue PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
+ static CConfigValue PBLURPOPUPS = CConfigValue<Config::INTEGER>("decoration:blur:popups");
+ static CConfigValue PBLUR = CConfigValue<Config::INTEGER>("decoration:blur:enabled");
return *PBLURPOPUPS && *PBLUR;
}
SP<ITexture> IHyprRenderer::renderSplash(const std::function<SP<ITexture>(const int, const int, unsigned char* const)>& handleData, const int fontSize, const int maxWidth,
const int maxHeight) {
- static auto PSPLASHCOLOR = CConfigValue<Hyprlang::INT>("misc:col.splash");
+ static auto PSPLASHCOLOR = CConfigValue<Config::INTEGER>("misc:col.splash");
static auto PSPLASHFONT = CConfigValue<std::string>("misc:splash_font_family");
static auto FALLBACKFONT = CConfigValue<std::string>("misc:font_family");
diff --git a/src/render/ShaderLoader.cpp b/src/render/ShaderLoader.cpp
index 388c1d43..50ab61d0 100644
--- a/src/render/ShaderLoader.cpp
+++ b/src/render/ShaderLoader.cpp
@@ -135,7 +135,7 @@ std::string CShaderLoader::process(const std::string& filename, const std::map<s
}
std::string CShaderLoader::getVariantSource(ePreparedFragmentShader frag, ShaderFeatureFlags features) {
- static const auto PCM = CConfigValue<Hyprlang::INT>("render:cm_enabled");
+ static const auto PCM = CConfigValue<Config::INTEGER>("render:cm_enabled");
if (!*PCM)
features &= ~(SH_FEAT_CM | SH_FEAT_TONEMAP | SH_FEAT_SDR_MOD);
diff --git a/src/render/decorations/CHyprBorderDecoration.cpp b/src/render/decorations/CHyprBorderDecoration.cpp
index 603d8635..93565f16 100644
--- a/src/render/decorations/CHyprBorderDecoration.cpp
+++ b/src/render/decorations/CHyprBorderDecoration.cpp
@@ -147,7 +147,7 @@ eDecorationLayer CHyprBorderDecoration::getDecorationLayer() {
}
uint64_t CHyprBorderDecoration::getDecorationFlags() {
- static auto PPARTOFWINDOW = CConfigValue<Hyprlang::INT>("decoration:border_part_of_window");
+ static auto PPARTOFWINDOW = CConfigValue<Config::INTEGER>("decoration:border_part_of_window");
return *PPARTOFWINDOW && !doesntWantBorders() ? DECORATION_PART_OF_MAIN_WINDOW : 0;
}
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index 3085facb..8c681301 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -38,7 +38,7 @@ std::string CHyprDropShadowDecoration::getDisplayName() {
}
void CHyprDropShadowDecoration::damageEntire() {
- static auto PSHADOWS = CConfigValue<Hyprlang::INT>("decoration:shadow:enabled");
+ static auto PSHADOWS = CConfigValue<Config::INTEGER>("decoration:shadow:enabled");
if (*PSHADOWS != 1)
return; // disabled
@@ -88,7 +88,7 @@ void CHyprDropShadowDecoration::draw(PHLMONITOR pMonitor, float const& a) {
}
bool CHyprDropShadowDecoration::canRender(PHLMONITOR pMonitor) {
- static auto PSHADOWS = CConfigValue<Hyprlang::INT>("decoration:shadow:enabled");
+ static auto PSHADOWS = CConfigValue<Config::INTEGER>("decoration:shadow:enabled");
if (*PSHADOWS != 1)
return false; // disabled
@@ -115,9 +115,9 @@ SShadowRenderData CHyprDropShadowDecoration::getRenderData(PHLMONITOR pMonitor,
const auto PWINDOW = m_window.lock();
- static auto PSHADOWSIZE = CConfigValue<Hyprlang::INT>("decoration:shadow:range");
- static auto PSHADOWSCALE = CConfigValue<Hyprlang::FLOAT>("decoration:shadow:scale");
- static auto PSHADOWOFFSET = CConfigValue<Hyprlang::VEC2>("decoration:shadow:offset");
+ static auto PSHADOWSIZE = CConfigValue<Config::INTEGER>("decoration:shadow:range");
+ static auto PSHADOWSCALE = CConfigValue<Config::FLOAT>("decoration:shadow:scale");
+ static auto PSHADOWOFFSET = CConfigValue<Config::VEC2>("decoration:shadow:offset");
const auto BORDERSIZE = PWINDOW->getRealBorderSize();
const auto ROUNDINGBASE = PWINDOW->rounding();
@@ -200,7 +200,7 @@ eDecorationLayer CHyprDropShadowDecoration::getDecorationLayer() {
}
void CHyprDropShadowDecoration::drawShadowInternal(const CBox& box, int round, float roundingPower, int range, CHyprColor color, float a) {
- static auto PSHADOWSHARP = CConfigValue<Hyprlang::INT>("decoration:shadow:sharp");
+ static auto PSHADOWSHARP = CConfigValue<Config::INTEGER>("decoration:shadow:sharp");
if (box.w < 1 || box.h < 1)
return;
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index b8f6d814..fa4b157e 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -23,23 +23,23 @@ static SP<ITexture> m_tGradientLockedInactive;
constexpr int BAR_TEXT_PAD = 2;
CHyprGroupBarDecoration::CHyprGroupBarDecoration(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow), m_window(pWindow) {
- static auto PGRADIENTS = CConfigValue<Hyprlang::INT>("group:groupbar:enabled");
- static auto PENABLED = CConfigValue<Hyprlang::INT>("group:groupbar:gradients");
+ static auto PGRADIENTS = CConfigValue<Config::INTEGER>("group:groupbar:enabled");
+ static auto PENABLED = CConfigValue<Config::INTEGER>("group:groupbar:gradients");
if (*PENABLED && *PGRADIENTS)
refreshGroupBarGradients();
}
SDecorationPositioningInfo CHyprGroupBarDecoration::getPositioningInfo() {
- static auto PHEIGHT = CConfigValue<Hyprlang::INT>("group:groupbar:height");
- static auto PINDICATORGAP = CConfigValue<Hyprlang::INT>("group:groupbar:indicator_gap");
- static auto PINDICATORHEIGHT = CConfigValue<Hyprlang::INT>("group:groupbar:indicator_height");
- static auto PRENDERTITLES = CConfigValue<Hyprlang::INT>("group:groupbar:render_titles");
- static auto PGRADIENTS = CConfigValue<Hyprlang::INT>("group:groupbar:gradients");
- static auto PPRIORITY = CConfigValue<Hyprlang::INT>("group:groupbar:priority");
- static auto PSTACKED = CConfigValue<Hyprlang::INT>("group:groupbar:stacked");
- static auto POUTERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_out");
- static auto PKEEPUPPERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:keep_upper_gap");
+ static auto PHEIGHT = CConfigValue<Config::INTEGER>("group:groupbar:height");
+ static auto PINDICATORGAP = CConfigValue<Config::INTEGER>("group:groupbar:indicator_gap");
+ static auto PINDICATORHEIGHT = CConfigValue<Config::INTEGER>("group:groupbar:indicator_height");
+ static auto PRENDERTITLES = CConfigValue<Config::INTEGER>("group:groupbar:render_titles");
+ static auto PGRADIENTS = CConfigValue<Config::INTEGER>("group:groupbar:gradients");
+ static auto PPRIORITY = CConfigValue<Config::INTEGER>("group:groupbar:priority");
+ static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked");
+ static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out");
+ static auto PKEEPUPPERGAP = CConfigValue<Config::INTEGER>("group:groupbar:keep_upper_gap");
SDecorationPositioningInfo info;
info.policy = DECORATION_POSITION_STICKY;
@@ -105,33 +105,33 @@ void CHyprGroupBarDecoration::draw(PHLMONITOR pMonitor, float const& a) {
if (!VISIBLE)
return;
- static auto PRENDERTITLES = CConfigValue<Hyprlang::INT>("group:groupbar:render_titles");
- static auto PTITLEFONTSIZE = CConfigValue<Hyprlang::INT>("group:groupbar:font_size");
- static auto PHEIGHT = CConfigValue<Hyprlang::INT>("group:groupbar:height");
- static auto PINDICATORGAP = CConfigValue<Hyprlang::INT>("group:groupbar:indicator_gap");
- static auto PINDICATORHEIGHT = CConfigValue<Hyprlang::INT>("group:groupbar:indicator_height");
- static auto PGRADIENTS = CConfigValue<Hyprlang::INT>("group:groupbar:gradients");
- static auto PSTACKED = CConfigValue<Hyprlang::INT>("group:groupbar:stacked");
- static auto PROUNDING = CConfigValue<Hyprlang::INT>("group:groupbar:rounding");
- static auto PROUNDINGPOWER = CConfigValue<Hyprlang::FLOAT>("group:groupbar:rounding_power");
- static auto PGRADIENTROUNDING = CConfigValue<Hyprlang::INT>("group:groupbar:gradient_rounding");
- static auto PGRADIENTROUNDINGPOWER = CConfigValue<Hyprlang::FLOAT>("group:groupbar:gradient_rounding_power");
- static auto PGRADIENTROUNDINGONLYEDGES = CConfigValue<Hyprlang::INT>("group:groupbar:gradient_round_only_edges");
- static auto PROUNDONLYEDGES = CConfigValue<Hyprlang::INT>("group:groupbar:round_only_edges");
- static auto PGROUPCOLACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.active");
- static auto PGROUPCOLINACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.inactive");
- static auto PGROUPCOLACTIVELOCKED = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.locked_active");
- static auto PGROUPCOLINACTIVELOCKED = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.locked_inactive");
- static auto POUTERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_out");
- static auto PINNERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_in");
- static auto PKEEPUPPERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:keep_upper_gap");
- static auto PTEXTOFFSET = CConfigValue<Hyprlang::INT>("group:groupbar:text_offset");
- static auto PTEXTPADDING = CConfigValue<Hyprlang::INT>("group:groupbar:text_padding");
- static auto PBLUR = CConfigValue<Hyprlang::INT>("group:groupbar:blur");
- auto* const GROUPCOLACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLACTIVE.ptr())->getData());
- auto* const GROUPCOLINACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVE.ptr())->getData());
- auto* const GROUPCOLACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLACTIVELOCKED.ptr())->getData());
- auto* const GROUPCOLINACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVELOCKED.ptr())->getData());
+ static auto PRENDERTITLES = CConfigValue<Config::INTEGER>("group:groupbar:render_titles");
+ static auto PTITLEFONTSIZE = CConfigValue<Config::INTEGER>("group:groupbar:font_size");
+ static auto PHEIGHT = CConfigValue<Config::INTEGER>("group:groupbar:height");
+ static auto PINDICATORGAP = CConfigValue<Config::INTEGER>("group:groupbar:indicator_gap");
+ static auto PINDICATORHEIGHT = CConfigValue<Config::INTEGER>("group:groupbar:indicator_height");
+ static auto PGRADIENTS = CConfigValue<Config::INTEGER>("group:groupbar:gradients");
+ static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked");
+ static auto PROUNDING = CConfigValue<Config::INTEGER>("group:groupbar:rounding");
+ static auto PROUNDINGPOWER = CConfigValue<Config::FLOAT>("group:groupbar:rounding_power");
+ static auto PGRADIENTROUNDING = CConfigValue<Config::INTEGER>("group:groupbar:gradient_rounding");
+ static auto PGRADIENTROUNDINGPOWER = CConfigValue<Config::FLOAT>("group:groupbar:gradient_rounding_power");
+ static auto PGRADIENTROUNDINGONLYEDGES = CConfigValue<Config::INTEGER>("group:groupbar:gradient_round_only_edges");
+ static auto PROUNDONLYEDGES = CConfigValue<Config::INTEGER>("group:groupbar:round_only_edges");
+ static auto PGROUPCOLACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.active");
+ static auto PGROUPCOLINACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.inactive");
+ static auto PGROUPCOLACTIVELOCKED = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.locked_active");
+ static auto PGROUPCOLINACTIVELOCKED = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.locked_inactive");
+ static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out");
+ static auto PINNERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_in");
+ static auto PKEEPUPPERGAP = CConfigValue<Config::INTEGER>("group:groupbar:keep_upper_gap");
+ static auto PTEXTOFFSET = CConfigValue<Config::INTEGER>("group:groupbar:text_offset");
+ static auto PTEXTPADDING = CConfigValue<Config::INTEGER>("group:groupbar:text_padding");
+ static auto PBLUR = CConfigValue<Config::INTEGER>("group:groupbar:blur");
+ auto* const GROUPCOLACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLACTIVE.ptr()));
+ auto* const GROUPCOLINACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVE.ptr()));
+ auto* const GROUPCOLACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLACTIVELOCKED.ptr()));
+ auto* const GROUPCOLINACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVELOCKED.ptr()));
const auto ASSIGNEDBOX = assignedBoxGlobal();
@@ -282,17 +282,17 @@ void CHyprGroupBarDecoration::invalidateTextures() {
CTitleTex::CTitleTex(PHLWINDOW pWindow, const Vector2D& bufferSize, const float monitorScale) : m_content(pWindow->m_title), m_windowOwner(pWindow) {
static auto FALLBACKFONT = CConfigValue<std::string>("misc:font_family");
static auto PTITLEFONTFAMILY = CConfigValue<std::string>("group:groupbar:font_family");
- static auto PTITLEFONTSIZE = CConfigValue<Hyprlang::INT>("group:groupbar:font_size");
- static auto PTEXTCOLORACTIVE = CConfigValue<Hyprlang::INT>("group:groupbar:text_color");
- static auto PTEXTCOLORINACTIVE = CConfigValue<Hyprlang::INT>("group:groupbar:text_color_inactive");
- static auto PTEXTCOLORLOCKEDACTIVE = CConfigValue<Hyprlang::INT>("group:groupbar:text_color_locked_active");
- static auto PTEXTCOLORLOCKEDINACTIVE = CConfigValue<Hyprlang::INT>("group:groupbar:text_color_locked_inactive");
+ static auto PTITLEFONTSIZE = CConfigValue<Config::INTEGER>("group:groupbar:font_size");
+ static auto PTEXTCOLORACTIVE = CConfigValue<Config::INTEGER>("group:groupbar:text_color");
+ static auto PTEXTCOLORINACTIVE = CConfigValue<Config::INTEGER>("group:groupbar:text_color_inactive");
+ static auto PTEXTCOLORLOCKEDACTIVE = CConfigValue<Config::INTEGER>("group:groupbar:text_color_locked_active");
+ static auto PTEXTCOLORLOCKEDINACTIVE = CConfigValue<Config::INTEGER>("group:groupbar:text_color_locked_inactive");
- static auto PTITLEFONTWEIGHTACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:font_weight_active");
- static auto PTITLEFONTWEIGHTINACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:font_weight_inactive");
+ static auto PTITLEFONTWEIGHTACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:font_weight_active");
+ static auto PTITLEFONTWEIGHTINACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:font_weight_inactive");
- const auto FONTWEIGHTACTIVE = sc<Config::CFontWeightConfigValueData*>((PTITLEFONTWEIGHTACTIVE.ptr())->getData());
- const auto FONTWEIGHTINACTIVE = sc<Config::CFontWeightConfigValueData*>((PTITLEFONTWEIGHTINACTIVE.ptr())->getData());
+ const auto FONTWEIGHTACTIVE = sc<Config::CFontWeightConfigValueData*>((PTITLEFONTWEIGHTACTIVE.ptr()));
+ const auto FONTWEIGHTINACTIVE = sc<Config::CFontWeightConfigValueData*>((PTITLEFONTWEIGHTINACTIVE.ptr()));
const CHyprColor COLORACTIVE = CHyprColor(*PTEXTCOLORACTIVE);
const CHyprColor COLORINACTIVE = *PTEXTCOLORINACTIVE == -1 ? COLORACTIVE : CHyprColor(*PTEXTCOLORINACTIVE);
@@ -351,17 +351,17 @@ static SP<ITexture> renderGradient(Config::CGradientValueData* grad) {
}
void refreshGroupBarGradients() {
- static auto PGRADIENTS = CConfigValue<Hyprlang::INT>("group:groupbar:enabled");
- static auto PENABLED = CConfigValue<Hyprlang::INT>("group:groupbar:gradients");
-
- static auto PGROUPCOLACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.active");
- static auto PGROUPCOLINACTIVE = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.inactive");
- static auto PGROUPCOLACTIVELOCKED = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.locked_active");
- static auto PGROUPCOLINACTIVELOCKED = CConfigValue<Hyprlang::CUSTOMTYPE>("group:groupbar:col.locked_inactive");
- auto* const GROUPCOLACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLACTIVE.ptr())->getData());
- auto* const GROUPCOLINACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVE.ptr())->getData());
- auto* const GROUPCOLACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLACTIVELOCKED.ptr())->getData());
- auto* const GROUPCOLINACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVELOCKED.ptr())->getData());
+ static auto PGRADIENTS = CConfigValue<Config::INTEGER>("group:groupbar:enabled");
+ static auto PENABLED = CConfigValue<Config::INTEGER>("group:groupbar:gradients");
+
+ static auto PGROUPCOLACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.active");
+ static auto PGROUPCOLINACTIVE = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.inactive");
+ static auto PGROUPCOLACTIVELOCKED = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.locked_active");
+ static auto PGROUPCOLINACTIVELOCKED = CConfigValue<Config::IComplexConfigValue>("group:groupbar:col.locked_inactive");
+ auto* const GROUPCOLACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLACTIVE.ptr()));
+ auto* const GROUPCOLINACTIVE = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVE.ptr()));
+ auto* const GROUPCOLACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLACTIVELOCKED.ptr()));
+ auto* const GROUPCOLINACTIVELOCKED = sc<Config::CGradientValueData*>((PGROUPCOLINACTIVELOCKED.ptr()));
if (m_tGradientActive && m_tGradientActive->ok()) {
m_tGradientActive.reset();
@@ -380,9 +380,9 @@ void refreshGroupBarGradients() {
}
bool CHyprGroupBarDecoration::onBeginWindowDragOnDeco(const Vector2D& pos) {
- static auto PSTACKED = CConfigValue<Hyprlang::INT>("group:groupbar:stacked");
- static auto POUTERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_out");
- static auto PINNERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_in");
+ static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked");
+ static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out");
+ static auto PINNERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_in");
if (m_window->m_group->size() == 1)
return false;
@@ -413,9 +413,9 @@ bool CHyprGroupBarDecoration::onBeginWindowDragOnDeco(const Vector2D& pos) {
}
bool CHyprGroupBarDecoration::onEndWindowDragOnDeco(const Vector2D& pos, PHLWINDOW pDraggedWindow) {
- static auto PDRAGINTOGROUP = CConfigValue<Hyprlang::INT>("group:drag_into_group");
- static auto PMERGEFLOATEDINTOTILEDONGROUPBAR = CConfigValue<Hyprlang::INT>("group:merge_floated_into_tiled_on_groupbar");
- static auto PMERGEGROUPSONGROUPBAR = CConfigValue<Hyprlang::INT>("group:merge_groups_on_groupbar");
+ static auto PDRAGINTOGROUP = CConfigValue<Config::INTEGER>("group:drag_into_group");
+ static auto PMERGEFLOATEDINTOTILEDONGROUPBAR = CConfigValue<Config::INTEGER>("group:merge_floated_into_tiled_on_groupbar");
+ static auto PMERGEGROUPSONGROUPBAR = CConfigValue<Config::INTEGER>("group:merge_groups_on_groupbar");
const bool FLOATEDINTOTILED = !m_window->m_isFloating && !g_layoutManager->dragController()->draggingTiled();
if (!pDraggedWindow->canBeGroupedInto(m_window->m_group) || (*PDRAGINTOGROUP != 1 && *PDRAGINTOGROUP != 2) || (FLOATEDINTOTILED && !*PMERGEFLOATEDINTOTILEDONGROUPBAR) ||
@@ -431,16 +431,16 @@ bool CHyprGroupBarDecoration::onEndWindowDragOnDeco(const Vector2D& pos, PHLWIND
}
bool CHyprGroupBarDecoration::onMouseButtonOnDeco(const Vector2D& pos, const IPointer::SButtonEvent& e) {
- static auto PSTACKED = CConfigValue<Hyprlang::INT>("group:groupbar:stacked");
- static auto POUTERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_out");
- static auto PINNERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_in");
+ static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked");
+ static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out");
+ static auto PINNERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_in");
if (m_window->isEffectiveInternalFSMode(FSMODE_FULLSCREEN))
return true;
const float BARRELATIVEX = pos.x - assignedBoxGlobal().x;
const float BARRELATIVEY = pos.y - assignedBoxGlobal().y;
const int WINDOWINDEX = *PSTACKED ? (BARRELATIVEY / (m_barHeight + *POUTERGAP)) : (BARRELATIVEX) / (m_barWidth + *PINNERGAP);
- static auto PFOLLOWMOUSE = CConfigValue<Hyprlang::INT>("input:follow_mouse");
+ static auto PFOLLOWMOUSE = CConfigValue<Config::INTEGER>("input:follow_mouse");
// close window on middle click
if (e.button == 274) {
@@ -481,7 +481,7 @@ bool CHyprGroupBarDecoration::onMouseButtonOnDeco(const Vector2D& pos, const IPo
}
bool CHyprGroupBarDecoration::onScrollOnDeco(const Vector2D& pos, const IPointer::SAxisEvent e) {
- static auto PGROUPBARSCROLLING = CConfigValue<Hyprlang::INT>("group:groupbar:scrolling");
+ static auto PGROUPBARSCROLLING = CConfigValue<Config::INTEGER>("group:groupbar:scrolling");
if (!*PGROUPBARSCROLLING || !m_window->m_group)
return false;
@@ -529,6 +529,6 @@ CBox CHyprGroupBarDecoration::assignedBoxGlobal() {
}
bool CHyprGroupBarDecoration::visible() {
- static auto PENABLED = CConfigValue<Hyprlang::INT>("group:groupbar:enabled");
+ static auto PENABLED = CConfigValue<Config::INTEGER>("group:groupbar:enabled");
return *PENABLED && m_window->m_ruleApplicator->decorate().valueOrDefault();
}
diff --git a/src/render/pass/Pass.cpp b/src/render/pass/Pass.cpp
index e4ef6f96..05e83e70 100644
--- a/src/render/pass/Pass.cpp
+++ b/src/render/pass/Pass.cpp
@@ -29,7 +29,7 @@ void CRenderPass::add(UP<IPassElement>&& el) {
void CRenderPass::simplify(bool willBlur, const CRegion& liveBlurRegion) {
const auto pMonitor = g_pHyprRenderer->m_renderData.pMonitor;
- static auto PDEBUGPASS = CConfigValue<Hyprlang::INT>("debug:pass");
+ static auto PDEBUGPASS = CConfigValue<Config::INTEGER>("debug:pass");
// TODO: use precompute blur for instances where there is nothing in between
@@ -102,7 +102,7 @@ void CRenderPass::clear() {
CRegion CRenderPass::render(const CRegion& damage_) {
const auto pMonitor = g_pHyprRenderer->m_renderData.pMonitor;
- static auto PDEBUGPASS = CConfigValue<Hyprlang::INT>("debug:pass");
+ static auto PDEBUGPASS = CConfigValue<Config::INTEGER>("debug:pass");
// single pass: cache blur results and gather aggregate info
bool willBlur = false, willDisableSimplification = false, willPrecomputeBlur = false;
@@ -309,8 +309,8 @@ void CRenderPass::renderDebugData() {
float CRenderPass::oneBlurRadius() {
// TODO: is this exact range correct?
- static auto PBLURSIZE = CConfigValue<Hyprlang::INT>("decoration:blur:size");
- static auto PBLURPASSES = CConfigValue<Hyprlang::INT>("decoration:blur:passes");
+ static auto PBLURSIZE = CConfigValue<Config::INTEGER>("decoration:blur:size");
+ static auto PBLURPASSES = CConfigValue<Config::INTEGER>("decoration:blur:passes");
const auto BLUR_PASSES = std::clamp(*PBLURPASSES, sc<int64_t>(1), sc<int64_t>(8));