From 7160655e786ddfe2490065fa3242feac7e0f6e59 Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 19 May 2026 12:37:37 +0200 Subject: [PATCH] make pw launch pavucontrol on click --- modules/bar/Pw.qml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/bar/Pw.qml b/modules/bar/Pw.qml index e0a893d..c073b31 100644 --- a/modules/bar/Pw.qml +++ b/modules/bar/Pw.qml @@ -1,5 +1,5 @@ import Quickshell.Services.Pipewire -import Quickshell.Widgets +import Quickshell.Io import QtQuick import QtQuick.Layouts import qs @@ -8,7 +8,7 @@ import qs.settings Rectangle { id: root - color: Colors.base01 + color: clickHandler.containsMouse ? Colors.base02 : Colors.base01 property PwNode defaultAudio: Pipewire.ready ? Pipewire.preferredDefaultAudioSink : null property bool mute: Pipewire.ready ? defaultAudio?.audio.muted : null radius: Config.rounding @@ -34,6 +34,12 @@ Rectangle { objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null] } + Process { + id: pavuLauncher + command: ["pavucontrol"] + running: false + } + RowLayout { id: pwLayout anchors.centerIn: root @@ -47,4 +53,12 @@ Rectangle { opacity: root.defaultAudio?.audio.muted ? 0.6 : 1.0 } } + MouseArea { + id: clickHandler + hoverEnabled: true + acceptedButtons: Qt.LeftButton + cursorShape: Qt.PointingHandCursor + anchors.fill: root + onClicked: pavuLauncher.running = true + } }