summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Matthew Hydock <mhydock@yahoo.com>2025-08-29 23:08:36 -0400
committerGitHub <noreply@github.com>2025-08-30 13:08:36 +1000
commit468bab5e5b4a5336cee24f124f58b17ef532bedb (patch)
treec53b85c99893665d0ac32362f29cc2ccc3328d03
parentbrightness: detect monitors by connector instead of model (#503) (diff)
downloadcaelestia-shell-468bab5e5b4a5336cee24f124f58b17ef532bedb.tar.gz
caelestia-shell-468bab5e5b4a5336cee24f124f58b17ef532bedb.tar.bz2
caelestia-shell-468bab5e5b4a5336cee24f124f58b17ef532bedb.zip
launcher: allow show on hover (#498)
added `showOnHover` to launcher config, disabled by default to preserve existing functionality. when enabled, drag-to-show is disabled.
-rw-r--r--README.md3
-rw-r--r--config/LauncherConfig.qml1
-rw-r--r--modules/drawers/Interactions.qml6
3 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index ad47b54..e853a92 100644
--- a/README.md
+++ b/README.md
@@ -383,7 +383,8 @@ The module automatically adds Caelestia shell to the path with **full functional
"schemes": false,
"variants": false,
"wallpapers": false
- }
+ },
+ "showOnHover": false
},
"lock": {
"recolourLogo": false
diff --git a/config/LauncherConfig.qml b/config/LauncherConfig.qml
index fa5b7a5..d021089 100644
--- a/config/LauncherConfig.qml
+++ b/config/LauncherConfig.qml
@@ -2,6 +2,7 @@ import Quickshell.Io
JsonObject {
property bool enabled: true
+ property bool showOnHover: false
property int maxShown: 8
property int maxWallpapers: 9 // Warning: even numbers look bad
property string specialPrefix: "@"
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 0b3b17d..fcaa790 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -121,8 +121,10 @@ CustomMouseArea {
visibilities.session = false;
}
- // Show/hide launcher on drag
- if (pressed && inBottomPanel(panels.launcher, dragStart.x, dragStart.y) && withinPanelWidth(panels.launcher, x, y)) {
+ // Show launcher on hover, or show/hide on drag if hover is disabled
+ if (Config.launcher.showOnHover) {
+ visibilities.launcher = inBottomPanel(panels.launcher, x, y);
+ } else if (pressed && inBottomPanel(panels.launcher, dragStart.x, dragStart.y) && withinPanelWidth(panels.launcher, x, y)) {
const dragY = y - dragStart.y;
if (dragY < -Config.launcher.dragThreshold)
visibilities.launcher = true;