summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-03-15 22:29:28 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-03-15 22:29:28 +1100
commit521cd4079ee665dda1881fb6082497d58d654969 (patch)
treecc67b67be41223a878b92ddcd72e395f0be6a152
parentbar/activewindow: format (diff)
downloadcaelestia-shell-521cd4079ee665dda1881fb6082497d58d654969.tar.gz
caelestia-shell-521cd4079ee665dda1881fb6082497d58d654969.tar.bz2
caelestia-shell-521cd4079ee665dda1881fb6082497d58d654969.zip
bar/activewindow: allow disable show on hover
Closes #1209 Closes #1019
-rw-r--r--README.md3
-rw-r--r--config/BarConfig.qml1
-rw-r--r--config/Config.qml3
-rw-r--r--modules/bar/Bar.qml3
-rw-r--r--modules/bar/components/ActiveWindow.qml15
5 files changed, 22 insertions, 3 deletions
diff --git a/README.md b/README.md
index e3fcba3..e3bebcd 100644
--- a/README.md
+++ b/README.md
@@ -333,7 +333,8 @@ default, you must create it manually.
"bar": {
"activeWindow": {
"compact": false,
- "inverted": false
+ "inverted": false,
+ "showOnHover": true
},
"clock": {
"showIcon": true
diff --git a/config/BarConfig.qml b/config/BarConfig.qml
index 2e04108..310344b 100644
--- a/config/BarConfig.qml
+++ b/config/BarConfig.qml
@@ -90,6 +90,7 @@ JsonObject {
component ActiveWindow: JsonObject {
property bool compact: false
property bool inverted: false
+ property bool showOnHover: true
}
component Tray: JsonObject {
diff --git a/config/Config.qml b/config/Config.qml
index 6efe960..2fd8c43 100644
--- a/config/Config.qml
+++ b/config/Config.qml
@@ -181,7 +181,8 @@ Singleton {
},
activeWindow: {
compact: bar.activeWindow.compact,
- inverted: bar.activeWindow.inverted
+ inverted: bar.activeWindow.inverted,
+ showOnHover: bar.activeWindow.showOnHover
},
tray: {
background: bar.tray.background,
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
index cb384e3..95c166e 100644
--- a/modules/bar/Bar.qml
+++ b/modules/bar/Bar.qml
@@ -68,7 +68,7 @@ ColumnLayout {
popouts.hasCurrent = false;
item.expanded = true;
}
- } else if (id === "activeWindow" && Config.bar.popouts.activeWindow) {
+ } else if (id === "activeWindow" && Config.bar.popouts.activeWindow && Config.bar.activeWindow.showOnHover) {
popouts.currentName = id.toLowerCase();
popouts.currentCenter = item.mapToItem(root, 0, itemHeight / 2).y;
popouts.hasCurrent = true;
@@ -134,6 +134,7 @@ ColumnLayout {
DelegateChoice {
roleValue: "activeWindow"
delegate: WrappedLoader {
+ Layout.fillWidth: true
sourceComponent: ActiveWindow {
bar: root
monitor: Brightness.getMonitorForScreen(root.screen)
diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml
index 3eb6904..4881f42 100644
--- a/modules/bar/components/ActiveWindow.qml
+++ b/modules/bar/components/ActiveWindow.qml
@@ -38,6 +38,21 @@ Item {
implicitWidth: Math.max(icon.implicitWidth, current.implicitHeight)
implicitHeight: icon.implicitHeight + current.implicitWidth + current.anchors.topMargin
+ Loader {
+ anchors.fill: parent
+ active: !Config.bar.activeWindow.showOnHover
+
+ sourceComponent: MouseArea {
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ const popouts = root.bar.popouts;
+ popouts.currentName = "activewindow";
+ popouts.currentCenter = root.mapToItem(root.bar, 0, root.implicitHeight / 2).y;
+ popouts.hasCurrent = true;
+ }
+ }
+ }
+
MaterialIcon {
id: icon