From cf965934ac789f3f0ba554e872cebae5be32ab9e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 23 May 2025 00:05:13 +0800 Subject: dashboard: media bongo cat --- modules/dashboard/dash/Media.qml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'modules') diff --git a/modules/dashboard/dash/Media.qml b/modules/dashboard/dash/Media.qml index 7894c59..69ff881 100644 --- a/modules/dashboard/dash/Media.qml +++ b/modules/dashboard/dash/Media.qml @@ -1,6 +1,8 @@ import "root:/widgets" import "root:/services" import "root:/config" +import Quickshell +import Quickshell.Io import Quickshell.Widgets import QtQuick import QtQuick.Shapes @@ -210,6 +212,33 @@ Item { } } + AnimatedImage { + id: bongocat + + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottomMargin: Appearance.padding.large + anchors.margins: Appearance.padding.large * 2 + + playing: false + source: "root:/assets/bongocat.gif" + asynchronous: true + fillMode: AnimatedImage.PreserveAspectFit + z: -1 + + Process { + running: true + command: [`${Quickshell.shellRoot}/assets/realtime-beat-detector.py`] + stdout: SplitParser { + onRead: data => { + if (Players.active?.isPlaying) + bongocat.currentFrame++; + } + } + } + } + component Control: StyledRect { id: control -- cgit v1.2.3-freya