summaryrefslogtreecommitdiff
path: root/modules/dashboard/dash/Media.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-26 00:10:05 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-26 00:10:05 +0800
commit90a65cd153183014ee50d74f9e32ca28165c7880 (patch)
tree0708d313b17012620007397073e121d2f65f7f91 /modules/dashboard/dash/Media.qml
parentbar: fix battery charging icons (diff)
downloadcaelestia-shell-90a65cd153183014ee50d74f9e32ca28165c7880.tar.gz
caelestia-shell-90a65cd153183014ee50d74f9e32ca28165c7880.tar.bz2
caelestia-shell-90a65cd153183014ee50d74f9e32ca28165c7880.zip
feat: dashboard media panel
Diffstat (limited to 'modules/dashboard/dash/Media.qml')
-rw-r--r--modules/dashboard/dash/Media.qml13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/dashboard/dash/Media.qml b/modules/dashboard/dash/Media.qml
index 9f366c3..075844c 100644
--- a/modules/dashboard/dash/Media.qml
+++ b/modules/dashboard/dash/Media.qml
@@ -12,7 +12,7 @@ Item {
property real playerProgress: {
const active = Players.active;
- return active ? active.position / active.length : 0;
+ return active?.length ? active.position / active.length : 0;
}
anchors.top: parent.top
@@ -223,18 +223,11 @@ Item {
anchors.bottomMargin: Appearance.padding.large
anchors.margins: Appearance.padding.large * 2
- playing: Players.active?.isPlaying ?? false
+ playing: visible && (Players.active?.isPlaying ?? false)
+ speed: BeatDetector.bpm / 300
source: "root:/assets/bongocat.gif"
asynchronous: true
fillMode: AnimatedImage.PreserveAspectFit
-
- Process {
- running: true
- command: [`${Quickshell.shellRoot}/assets/realtime-beat-detector.py`]
- stdout: SplitParser {
- onRead: data => bongocat.speed = parseFloat(data) / 300
- }
- }
}
component Control: StyledRect {