From 5bcface15ad17cd352fb4c9b5b76ac6d6c7feb4d Mon Sep 17 00:00:00 2001 From: Noah Zepner Date: Thu, 7 Aug 2025 04:32:37 +0200 Subject: dashboard: showOnHover config option (#361) * dashboard: showOnHover config option * dashboard: close on lose focus when !showOnHover Also update readme --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> --- modules/dashboard/Wrapper.qml | 7 +++++++ modules/drawers/Interactions.qml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml index 9863e01..1a547c9 100644 --- a/modules/dashboard/Wrapper.qml +++ b/modules/dashboard/Wrapper.qml @@ -4,6 +4,7 @@ import qs.components.filedialog import qs.config import qs.utils import Quickshell +import Quickshell.Hyprland import QtQuick Item { @@ -64,6 +65,12 @@ Item { } ] + HyprlandFocusGrab { + active: !Config.dashboard.showOnHover && root.visibilities.dashboard && Config.dashboard.enabled + windows: [QsWindow.window] + onCleared: root.visibilities.dashboard = false + } + Loader { id: content diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 7b18adf..1cd1736 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -120,7 +120,7 @@ MouseArea { } // Show dashboard on hover - const showDashboard = inTopPanel(panels.dashboard, x, y); + const showDashboard = Config.dashboard.showOnHover && inTopPanel(panels.dashboard, x, y); // Always update visibility based on hover if not in shortcut mode if (!dashboardShortcutActive) { -- cgit v1.2.3-freya