summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 17:30:33 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 17:30:33 +1000
commit3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa (patch)
tree93569a72f6798476e40b47ee7381fb89929ebf59 /services
parentinternal: fix beat detector (diff)
downloadcaelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.tar.gz
caelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.tar.bz2
caelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.zip
internal: properly fix beat detector
Diffstat (limited to 'services')
-rw-r--r--services/BeatDetector.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/BeatDetector.qml b/services/BeatDetector.qml
index b210801..65dd88e 100644
--- a/services/BeatDetector.qml
+++ b/services/BeatDetector.qml
@@ -12,7 +12,11 @@ Singleton {
running: true
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]);
+ }
}
}
}