summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-05 17:42:02 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-05 17:42:02 +1000
commit6afd2a1525c1141e124190a4a51a5944f02353c3 (patch)
treea82a19489bb4c9ed79d4001d4ac4d5a76174546e /services
parentdashboard: center media pane (diff)
downloadcaelestia-shell-6afd2a1525c1141e124190a4a51a5944f02353c3.tar.gz
caelestia-shell-6afd2a1525c1141e124190a4a51a5944f02353c3.tar.bz2
caelestia-shell-6afd2a1525c1141e124190a4a51a5944f02353c3.zip
internal: move cava to service
Diffstat (limited to 'services')
-rw-r--r--services/Cava.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/services/Cava.qml b/services/Cava.qml
new file mode 100644
index 0000000..eaa6e20
--- /dev/null
+++ b/services/Cava.qml
@@ -0,0 +1,19 @@
+pragma Singleton
+
+import "root:/config"
+import Quickshell
+import Quickshell.Io
+
+Singleton {
+ id: root
+
+ property list<int> values
+
+ Process {
+ running: true
+ command: ["sh", "-c", `printf '[general]\nframerate=60\nbars=${DashboardConfig.visualiserBars}\n[output]\nchannels=mono\nmethod=raw\nraw_target=/dev/stdout\ndata_format=ascii\nascii_max_range=100' | cava -p /dev/stdin`]
+ stdout: SplitParser {
+ onRead: data => root.values = data.slice(0, -1).split(";").map(v => parseInt(v, 10))
+ }
+ }
+}