diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5de30a74..72502db3 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2394,9 +2394,9 @@ PHLWINDOW CCompositor::getWindowByRegex(const std::string& regexp) { void CCompositor::warpCursorTo(const Vector2D& pos, bool force) { // warpCursorTo should only be used for warps that - // should be disabled with no_cursor_warps + // should be disabled with no_warps - static auto PNOWARPS = CConfigValue("general:no_cursor_warps"); + static auto PNOWARPS = CConfigValue("cursor:no_warps"); if (*PNOWARPS && !force) return; diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 7804a511..38bf8173 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -311,8 +311,6 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("general:gaps_in", Hyprlang::CConfigCustomValueType{configHandleGapSet, configHandleGapDestroy, "5"}); m_pConfig->addConfigValue("general:gaps_out", Hyprlang::CConfigCustomValueType{configHandleGapSet, configHandleGapDestroy, "20"}); m_pConfig->addConfigValue("general:gaps_workspaces", Hyprlang::INT{0}); - m_pConfig->addConfigValue("general:cursor_inactive_timeout", Hyprlang::INT{0}); - m_pConfig->addConfigValue("general:no_cursor_warps", Hyprlang::INT{0}); m_pConfig->addConfigValue("general:no_focus_fallback", Hyprlang::INT{0}); m_pConfig->addConfigValue("general:resize_on_border", Hyprlang::INT{0}); m_pConfig->addConfigValue("general:extend_border_grab_area", Hyprlang::INT{15}); @@ -320,7 +318,6 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("general:layout", {"dwindle"}); m_pConfig->addConfigValue("general:allow_tearing", Hyprlang::INT{0}); m_pConfig->addConfigValue("general:resize_corner", Hyprlang::INT{0}); - m_pConfig->addConfigValue("general:default_cursor_monitor", {STRVAL_EMPTY}); m_pConfig->addConfigValue("misc:disable_hyprland_logo", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:disable_splash_rendering", Hyprlang::INT{0}); @@ -341,18 +338,13 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("misc:swallow_exception_regex", {STRVAL_EMPTY}); m_pConfig->addConfigValue("misc:focus_on_activate", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:no_direct_scanout", Hyprlang::INT{1}); - m_pConfig->addConfigValue("misc:hide_cursor_on_touch", Hyprlang::INT{1}); m_pConfig->addConfigValue("misc:mouse_move_focuses_monitor", Hyprlang::INT{1}); m_pConfig->addConfigValue("misc:render_ahead_of_time", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:render_ahead_safezone", Hyprlang::INT{1}); - m_pConfig->addConfigValue("misc:cursor_zoom_factor", {1.f}); - m_pConfig->addConfigValue("misc:cursor_zoom_rigid", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:allow_session_lock_restore", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:close_special_on_empty", Hyprlang::INT{1}); m_pConfig->addConfigValue("misc:background_color", Hyprlang::INT{0xff111111}); m_pConfig->addConfigValue("misc:new_window_takes_over_fullscreen", Hyprlang::INT{0}); - m_pConfig->addConfigValue("misc:enable_hyprcursor", Hyprlang::INT{1}); - m_pConfig->addConfigValue("misc:hide_cursor_on_key_press", Hyprlang::INT{0}); m_pConfig->addConfigValue("misc:initial_workspace_tracking", Hyprlang::INT{1}); m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1}); @@ -519,6 +511,14 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{0}); m_pConfig->addConfigValue("cursor:hotspot_padding", Hyprlang::INT{1}); + m_pConfig->addConfigValue("cursor:inactive_timeout", Hyprlang::INT{0}); + m_pConfig->addConfigValue("cursor:no_warps", Hyprlang::INT{0}); + m_pConfig->addConfigValue("cursor:default_monitor", {STRVAL_EMPTY}); + m_pConfig->addConfigValue("cursor:zoom_factor", {1.f}); + m_pConfig->addConfigValue("cursor:zoom_rigid", Hyprlang::INT{0}); + m_pConfig->addConfigValue("cursor:enable_hyprcursor", Hyprlang::INT{1}); + m_pConfig->addConfigValue("cursor:hide_on_key_press", Hyprlang::INT{0}); + m_pConfig->addConfigValue("cursor:hide_on_touch", Hyprlang::INT{1}); m_pConfig->addConfigValue("autogenerated", Hyprlang::INT{0}); diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 56b7bd2b..a89e0710 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -955,7 +955,7 @@ std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) { } // decorations will probably need a repaint - if (COMMAND.contains("decoration:") || COMMAND.contains("border") || COMMAND == "workspace" || COMMAND.contains("cursor_zoom_factor") || COMMAND == "source") { + if (COMMAND.contains("decoration:") || COMMAND.contains("border") || COMMAND == "workspace" || COMMAND.contains("zoom_factor") || COMMAND == "source") { for (auto& m : g_pCompositor->m_vMonitors) { g_pHyprRenderer->damageMonitor(m.get()); g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID); diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index ab8fc7b0..e3f8f03a 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -18,7 +18,7 @@ static void checkDefaultCursorWarp(SP PNEWMONITOR, std::string monitorName) { - static auto PCURSORMONITOR = CConfigValue("general:default_cursor_monitor"); + static auto PCURSORMONITOR = CConfigValue("cursor:default_monitor"); static auto firstMonitorAdded = std::chrono::system_clock::now(); static bool cursorDefaultDone = false; static bool firstLaunch = true; diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 31d8d22f..2814bc84 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -327,7 +327,7 @@ void CMonitor::onDisconnect(bool destroy) { } void CMonitor::addDamage(const pixman_region32_t* rg) { - static auto PZOOMFACTOR = CConfigValue("misc:cursor_zoom_factor"); + static auto PZOOMFACTOR = CConfigValue("cursor:zoom_factor"); if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == this) { wlr_damage_ring_add_whole(&damage); g_pCompositor->scheduleFrameForMonitor(this); @@ -340,7 +340,7 @@ void CMonitor::addDamage(const CRegion* rg) { } void CMonitor::addDamage(const CBox* box) { - static auto PZOOMFACTOR = CConfigValue("misc:cursor_zoom_factor"); + static auto PZOOMFACTOR = CConfigValue("cursor:zoom_factor"); if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == this) { wlr_damage_ring_add_whole(&damage); g_pCompositor->scheduleFrameForMonitor(this); diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 4ee3adfc..ea36b9b2 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -156,7 +156,7 @@ void CCursorManager::setXCursor(const std::string& name) { void CCursorManager::setCursorFromName(const std::string& name) { - static auto PUSEHYPRCURSOR = CConfigValue("misc:enable_hyprcursor"); + static auto PUSEHYPRCURSOR = CConfigValue("cursor:enable_hyprcursor"); if (!m_pHyprcursor->valid() || !*PUSEHYPRCURSOR) { setXCursor(name); diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 76f76126..1d09dbb9 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -132,7 +132,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { static auto PMOUSEFOCUSMON = CConfigValue("misc:mouse_move_focuses_monitor"); static auto PRESIZEONBORDER = CConfigValue("general:resize_on_border"); static auto PRESIZECURSORICON = CConfigValue("general:hover_icon_on_border"); - static auto PZOOMFACTOR = CConfigValue("misc:cursor_zoom_factor"); + static auto PZOOMFACTOR = CConfigValue("cursor:zoom_factor"); const auto FOLLOWMOUSE = *PFOLLOWONDND && m_sDrag.drag ? 1 : *PFOLLOWMOUSE; diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 14a9dcba..a8a20f30 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -394,7 +394,7 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, const CRegion& damage_, CFramebu } void CHyprOpenGLImpl::end() { - static auto PZOOMRIGID = CConfigValue("misc:cursor_zoom_rigid"); + static auto PZOOMRIGID = CConfigValue("cursor:zoom_rigid"); TRACY_GPU_ZONE("RenderEnd"); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 76f761d2..d1baf461 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1092,7 +1092,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { static auto PDAMAGEBLINK = CConfigValue("debug:damage_blink"); static auto PNODIRECTSCANOUT = CConfigValue("misc:no_direct_scanout"); static auto PVFR = CConfigValue("misc:vfr"); - static auto PZOOMFACTOR = CConfigValue("misc:cursor_zoom_factor"); + static auto PZOOMFACTOR = CConfigValue("cursor:zoom_factor"); static auto PANIMENABLED = CConfigValue("animations:enabled"); static auto PFIRSTLAUNCHANIM = CConfigValue("animations:first_launch_animation"); static auto PTEARINGENABLED = CConfigValue("general:allow_tearing"); @@ -2278,9 +2278,9 @@ void CHyprRenderer::setCursorFromName(const std::string& name, bool force) { } void CHyprRenderer::ensureCursorRenderingMode() { - static auto PCURSORTIMEOUT = CConfigValue("general:cursor_inactive_timeout"); - static auto PHIDEONTOUCH = CConfigValue("misc:hide_cursor_on_touch"); - static auto PHIDEONKEY = CConfigValue("misc:hide_cursor_on_key_press"); + static auto PCURSORTIMEOUT = CConfigValue("cursor:inactive_timeout"); + static auto PHIDEONTOUCH = CConfigValue("cursor:hide_on_touch"); + static auto PHIDEONKEY = CConfigValue("cursor:hide_on_key_press"); if (*PCURSORTIMEOUT <= 0) m_sCursorHiddenConditions.hiddenOnTimeout = false;