37 lines
991 B
QML
37 lines
991 B
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import Quickshell.Services.UPower
|
|
import Quickshell.Services.Pipewire
|
|
|
|
Rectangle {
|
|
id: root
|
|
property PwNode defaultSpeaker: Pipewire.preferredDefaultAudioSink
|
|
property PwNode defaultMic: Pipewire.defaultAudioSource
|
|
|
|
PwObjectTracker {
|
|
objects: [root.defaultSpeaker, root.defaultMic]
|
|
}
|
|
visible: root.defaultSpeaker.audio.muted || root.defaultMic.audio.muted
|
|
implicitHeight: 20
|
|
implicitWidth: content.width
|
|
color: Colors.backgroundAlt
|
|
Layout.alignment: Qt.AlignCenter
|
|
radius: 3.5
|
|
RowLayout {
|
|
id: content
|
|
height: 20
|
|
anchors.centerIn: parent
|
|
Text {
|
|
id: speaker
|
|
text: root.defaultSpeaker.audio.muted ? "muted" : "unmuted"
|
|
color: Colors.textPrimary
|
|
}
|
|
Text {
|
|
id: mic
|
|
text: root.defaultMic.audio.muted ? "muted" : "unmuted"
|
|
color: Colors.textPrimary
|
|
}
|
|
}
|
|
}
|