diff options
Diffstat (limited to '.config/quickshell/Services/Cava.qml')
| -rw-r--r-- | .config/quickshell/Services/Cava.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/quickshell/Services/Cava.qml b/.config/quickshell/Services/Cava.qml new file mode 100644 index 0000000..96cb918 --- /dev/null +++ b/.config/quickshell/Services/Cava.qml @@ -0,0 +1,21 @@ +pragma Singleton + +import Quickshell +import Quickshell.Io +import QtQuick + +Singleton { + id: root + property list<int> heights + + Process { + command: ["cava", "-p", "/home/samn/.config/quickshell/cava.ini"] + running: true + stdout: SplitParser { + onRead: line => { + var heights = line.substring(0, line.length - 1).split(';').map(x => parseInt(x)) + if (heights !== root.heights) root.heights = heights + } + } + } +} |
