Add a no-animations mode, on by default in VMs (#13550)
A machine without a GPU, like most VMs, renders through llvmpipe on the CPU, where every animated frame and every translucent window costs. In a VM, opening and closing a terminal took ~5s of CPU; a panel ~3.4s. omarchy toggle animations (also under Toggle > Animations) places a Hyprland flag that turns off animations, blur and shadows and makes windows opaque. The shell follows Hyprland's animations:enabled, rereading it on every config reload: its one-shot animations run for Style.duration(ms), which is then 0, and its spinners, pulses and title marquee hold still. A new install in a VM starts with the flag in place. Measured in the ISO test VM (llvmpipe), CPU per interaction: terminal open+close 5000ms -> 481ms, workspace switch 1670ms -> 409ms, audio panel 3446ms -> 796ms, volume OSD 2324ms -> 584ms, menu 2028ms -> 1241ms. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
97a9fce54f
commit
b18ab4952b
41 files changed
+201
-79
No files matched your search
+2
-2
@@ -125,7 +125,7 @@ BorderSurface {
|
||||
// dedicated selected border.
|
||||
borderSpec: _borderSpec
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 120 } }
|
||||
Behavior on color { ColorAnimation { duration: Style.duration(120) } }
|
||||
|
||||
ToolTip {
|
||||
visible: root.tooltipText !== "" && mouseArea.containsMouse
|
||||
@@ -174,7 +174,7 @@ BorderSurface {
|
||||
to: 360
|
||||
duration: 900
|
||||
loops: Animation.Infinite
|
||||
running: root.iconSpinning
|
||||
running: root.iconSpinning && !Style.reduceMotion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ BorderSurface {
|
||||
: Border.none()))
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 60 }
|
||||
ColorAnimation { duration: Style.duration(60) }
|
||||
}
|
||||
}
|
||||
@@ -390,7 +390,7 @@ PanelWindow {
|
||||
|
||||
Behavior on opacity {
|
||||
enabled: !root.popoutSwitching && !root.popoutSwitchClosing
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
// Swallow clicks on the card so they don't bubble to the dismissal
|
||||
@@ -411,7 +411,7 @@ PanelWindow {
|
||||
|
||||
Behavior on opacity {
|
||||
enabled: root.popoutSwitching
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ Item {
|
||||
font.pixelSize: Style.font.body
|
||||
|
||||
RotationAnimator on rotation {
|
||||
running: root.loadingOptions
|
||||
running: root.loadingOptions && !Style.reduceMotion
|
||||
from: 0; to: 360
|
||||
duration: 800
|
||||
loops: Animation.Infinite
|
||||
|
||||
@@ -66,7 +66,7 @@ BorderSurface {
|
||||
: "transparent")
|
||||
borderSpec: _borderSpec
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 60 } }
|
||||
Behavior on color { ColorAnimation { duration: Style.duration(60) } }
|
||||
|
||||
Text {
|
||||
textFormat: Text.PlainText
|
||||
|
||||
@@ -62,7 +62,7 @@ Item {
|
||||
|
||||
Behavior on width {
|
||||
enabled: !root.dragging
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ Item {
|
||||
|
||||
Behavior on x {
|
||||
enabled: !root.dragging
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation { duration: 110; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(110); easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ PopupWindow {
|
||||
opacity: root.open ? 1.0 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
Item {
|
||||
|
||||
@@ -61,7 +61,7 @@ PanelWindow {
|
||||
onRightValueChanged: expandScale(rightValue)
|
||||
|
||||
Behavior on fullScale {
|
||||
NumberAnimation { duration: 400; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(400); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
// The scrim below is a fixed near-black regardless of theme, so text and
|
||||
@@ -178,7 +178,7 @@ PanelWindow {
|
||||
onClicked: root.runAgainRequested()
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 240; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(240); easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,13 +236,13 @@ PanelWindow {
|
||||
opacity: engaged ? 1 : 0.5
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 240; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(240); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
// Live readings land once a second; glide between them rather than snap.
|
||||
Behavior on shown {
|
||||
enabled: !ignition.running
|
||||
NumberAnimation { duration: 600; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(600); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
@@ -257,8 +257,8 @@ PanelWindow {
|
||||
// the live figures take over.
|
||||
SequentialAnimation {
|
||||
id: ignition
|
||||
NumberAnimation { target: dial; property: "shown"; to: dial.fullScale; duration: 550; easing.type: Easing.InOutCubic }
|
||||
NumberAnimation { target: dial; property: "shown"; to: 0; duration: 650; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { target: dial; property: "shown"; to: dial.fullScale; duration: Style.duration(550); easing.type: Easing.InOutCubic }
|
||||
NumberAnimation { target: dial; property: "shown"; to: 0; duration: Style.duration(650); easing.type: Easing.OutCubic }
|
||||
onFinished: dial.shown = dial.value
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ BorderSurface {
|
||||
color: Style.controlFill(activeFocus, _hot, foreground, accent)
|
||||
borderSpec: _borderSpec
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 100 } }
|
||||
Behavior on color { ColorAnimation { duration: Style.duration(100) } }
|
||||
|
||||
Row {
|
||||
id: content
|
||||
|
||||
@@ -84,7 +84,7 @@ Item {
|
||||
: Style.normalFillFor(root.foreground, root.accent)
|
||||
borderSpec: Border.controlSpec(root.checked ? "selected" : "normal", root.foreground, root.accent)
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 120 } }
|
||||
Behavior on color { ColorAnimation { duration: Style.duration(120) } }
|
||||
|
||||
Rectangle {
|
||||
width: root.knobSize
|
||||
@@ -94,8 +94,8 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: root.checked ? Style.selectedStateColor(root.foreground, root.accent) : Qt.darker(root.foreground, 1.25)
|
||||
|
||||
Behavior on x { NumberAnimation { duration: 120; easing.type: Easing.OutCubic } }
|
||||
Behavior on color { ColorAnimation { duration: 120 } }
|
||||
Behavior on x { NumberAnimation { duration: Style.duration(120); easing.type: Easing.OutCubic } }
|
||||
Behavior on color { ColorAnimation { duration: Style.duration(120) } }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ Item {
|
||||
implicitHeight: fixedHeight > 0 ? fixedHeight : (vertical ? Math.max(12, label.implicitHeight + scaledVerticalPadding * 2) : barSize)
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
Text {
|
||||
@@ -88,7 +88,7 @@ Item {
|
||||
|
||||
Behavior on color {
|
||||
enabled: !root.bar || root.bar.foregroundAnimationEnabled
|
||||
ColorAnimation { duration: 160 }
|
||||
ColorAnimation { duration: Style.duration(160) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user