diff options
Diffstat (limited to 'services/BeatDetector.qml')
| -rw-r--r-- | services/BeatDetector.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/BeatDetector.qml b/services/BeatDetector.qml index 66bf2d4..65dd88e 100644 --- a/services/BeatDetector.qml +++ b/services/BeatDetector.qml @@ -10,9 +10,13 @@ Singleton { Process { running: true - command: [`${Quickshell.shellRoot}/assets/realtime-beat-detector.py`] + command: ["/usr/lib/caelestia/beat_detector", "--no-log", "--no-stats", "--no-visual"] stdout: SplitParser { - onRead: data => root.bpm = parseFloat(data) + onRead: data => { + const match = data.match(/BPM: ([0-9]+\.[0-9])/); + if (match) + root.bpm = parseFloat(match[1]); + } } } } |