From 5ba33f846129f3e6c0505b19f94634b24505e828 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Apr 2026 15:16:36 +0100 Subject: 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. --- src/managers/CursorManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/managers/CursorManager.cpp') diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 7564ca75..2bf72f84 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -71,7 +71,7 @@ void CCursorBuffer::endDataPtr() { CCursorManager::CCursorManager() { m_hyprcursor = makeUnique(m_theme.empty() ? nullptr : m_theme.c_str(), hcLogger); m_xcursor = makeUnique(); - static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); if (m_hyprcursor->valid() && *PUSEHYPRCURSOR) { // find default size. First, HYPRCURSOR_SIZE then default to 24 @@ -160,7 +160,7 @@ void CCursorManager::setAnimationTimer(const int& frame, const int& delay) { void CCursorManager::setCursorFromName(const std::string& name) { - static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); auto setXCursor = [this](auto const& name) { float scale = std::ceil(m_cursorScale); @@ -272,7 +272,7 @@ SCursorImageData CCursorManager::dataFor(const std::string& name) { } void CCursorManager::setXWaylandCursor() { - static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); const auto CURSOR = dataFor("left_ptr"); if (CURSOR.surface && *PUSEHYPRCURSOR) g_pXWayland->setCursor(cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), {CURSOR.size, CURSOR.size}, @@ -286,7 +286,7 @@ void CCursorManager::setXWaylandCursor() { } void CCursorManager::updateTheme() { - static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); float highestScale = 1.0; for (auto const& m : g_pCompositor->m_monitors) { @@ -314,7 +314,7 @@ void CCursorManager::updateTheme() { } bool CCursorManager::changeTheme(const std::string& name, const int size) { - static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); m_theme = name.empty() ? "" : name; m_size = size <= 0 ? 24 : size; auto xcursor_theme = getenv("XCURSOR_THEME") ? getenv("XCURSOR_THEME") : "default"; -- cgit v1.2.3