From 2c6ae8a4287ffad33a8c41b08ef47b62494a67dd Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Wed, 14 Jan 2026 14:47:59 -0500 Subject: Add quickshell config --- .config/quickshell/Song.qml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .config/quickshell/Song.qml (limited to '.config/quickshell/Song.qml') diff --git a/.config/quickshell/Song.qml b/.config/quickshell/Song.qml new file mode 100644 index 0000000..14d7704 --- /dev/null +++ b/.config/quickshell/Song.qml @@ -0,0 +1,31 @@ +pragma Singleton + +import Quickshell +import Quickshell.Io +import QtQuick + +Singleton { + id: root + property string artist + property string title + + Process { + id: songProc + command: ["rmpc", "song"] + running: true + stdout: StdioCollector { + onStreamFinished: { + var obj = JSON.parse(this.text); + root.artist = obj.metadata.artist + root.title = obj.metadata.title + } + } + } + + Timer { + interval: 5000 + running: true + repeat: true + onTriggered: songProc.running = true + } +} -- cgit v1.2.3