/ services / BeatDetector.qml
BeatDetector.qml
 1  pragma Singleton
 2  
 3  import Quickshell
 4  import Quickshell.Io
 5  
 6  Singleton {
 7      id: root
 8  
 9      property real bpm
10  
11      Process {
12          running: true
13          command: [`${Quickshell.shellRoot}/assets/realtime-beat-detector.py`]
14          stdout: SplitParser {
15              onRead: data => root.bpm = parseFloat(data)
16          }
17      }
18  }