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>
This commit is contained in:
Noah Zepner 2025-08-07 04:32:37 +02:00 committed by GitHub
parent 33501ae7e5
commit 5bcface15a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 1 deletions

View file

@ -188,7 +188,10 @@ All configuration options are in `~/.config/caelestia/shell.json`.
"thickness": 10 "thickness": 10
}, },
"dashboard": { "dashboard": {
"enabled": true,
"dragThreshold": 50,
"mediaUpdateInterval": 500, "mediaUpdateInterval": 500,
"showOnHover": true,
"visualiserBars": 45 "visualiserBars": 45
}, },
"launcher": { "launcher": {

View file

@ -2,6 +2,7 @@ import Quickshell.Io
JsonObject { JsonObject {
property bool enabled: true property bool enabled: true
property bool showOnHover: true
property int mediaUpdateInterval: 500 property int mediaUpdateInterval: 500
property int visualiserBars: 45 property int visualiserBars: 45
property int dragThreshold: 50 property int dragThreshold: 50

View file

@ -4,6 +4,7 @@ import qs.components.filedialog
import qs.config import qs.config
import qs.utils import qs.utils
import Quickshell import Quickshell
import Quickshell.Hyprland
import QtQuick import QtQuick
Item { 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 { Loader {
id: content id: content

View file

@ -120,7 +120,7 @@ MouseArea {
} }
// Show dashboard on hover // 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 // Always update visibility based on hover if not in shortcut mode
if (!dashboardShortcutActive) { if (!dashboardShortcutActive) {