Krolyxon
Commit a718c55

Branches

Refs →

auroraa718c55

aurora: animate the overview

Author
krolyxon
Date
2026-11-07 19:19 +0530
Parent
b132678
Commit
a718c552d4c8a2e50b1d01de9b5a874763f5351e

+14 −2

1 file changed

  1. M .config/quickshell/aurora/Overview.qml +14 −2
M .config/quickshell/aurora/Overview.qml View
@@ -7,12 +7,17 @@ import Quickshell.Hyprland
77 // Window overview for one monitor: its 10 workspaces as scaled boxes with live window previews.
88 // Click a window = focus, click a workspace = switch, drag a window onto another box = move.
99 // Type to filter by title/class, Enter focuses the first match, Esc closes.
10+// Opens like zooming out of the desktop: the scrim fades in, the filter drops in and the workspaces settle into
11+// place in a short wave (all driven by `t`, reversed on close; instant with animations off).
1012 PanelWindow {
1113 id: win
1214 property bool opened: false
1315 signal closeRequested()
1416
15− visible: opened
17+ property real t: opened ? 1 : 0
18+ Behavior on t { NumberAnimation { duration: Theme.t * 1.4; easing.type: Easing.BezierSpline; easing.bezierCurve: Theme.glide } }
19+
20+ visible: t > 0
1621 anchors { top: true; bottom: true; left: true; right: true }
1722 exclusionMode: ExclusionMode.Ignore
1823 color: "transparent"
@@ -74,6 +79,7 @@ PanelWindow {
7479 Rectangle {
7580 anchors.fill: parent
7681 color: Theme.scrim
82+ opacity: win.t
7783 MouseArea { anchors.fill: parent; onClicked: win.closeRequested() }
7884 }
7985
@@ -87,6 +93,8 @@ PanelWindow {
8793 RowLayout {
8894 Layout.alignment: Qt.AlignHCenter
8995 spacing: 8
96+ opacity: win.t
97+ transform: Translate { y: -20 * (1 - win.t) }
9098 Rectangle {
9199 implicitWidth: 520
92100 implicitHeight: 56
@@ -162,6 +170,10 @@ PanelWindow {
162170 id: box
163171 required property int index
164172 readonly property int wsId: win.offset + index + 1
173+ // this box's share of the open animation: each starts a little after the one before
174+ readonly property real p: Math.max(0, Math.min(1, (win.t - index * 0.03) / 0.73))
175+ opacity: p
176+ scale: 1.08 - 0.08 * p
165177 readonly property bool current: win.activeWs !== null && win.activeWs.id === wsId
166178 readonly property real originX: (grid.width - (grid.boxW * grid.cols + grid.gap * (grid.cols - 1))) / 2
167179 x: originX + (index % grid.cols) * (grid.boxW + grid.gap)
@@ -229,7 +241,7 @@ PanelWindow {
229241 id: shot
230242 anchors.fill: parent
231243 anchors.margins: 1
232− captureSource: win.opened && tile.modelData.wayland ? tile.modelData.wayland : null
244+ captureSource: win.visible && tile.modelData.wayland ? tile.modelData.wayland : null
233245 live: true
234246 }
235247 Image { // big centred icon until the preview arrives, then a corner badge