53 lines
1.5 KiB
QML
53 lines
1.5 KiB
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
|
|
spacing: 4
|
|
Rectangle {
|
|
implicitWidth: 24
|
|
implicitHeight: 20
|
|
color: "transparent"
|
|
Text {
|
|
anchors.centerIn: parent
|
|
text: root.defaultSpeaker.audio.muted ? "" : ""
|
|
font.family: "CaskaydiaCove NF"
|
|
font.pixelSize: 20
|
|
color: Colors.textPrimary
|
|
}
|
|
}
|
|
Rectangle {
|
|
implicitWidth: 24
|
|
implicitHeight: 20
|
|
color: "transparent"
|
|
radius: 3
|
|
Text {
|
|
anchors.centerIn: parent
|
|
text: root.defaultMic.audio.muted ? "" : ""
|
|
font.family: "CaskaydiaCove NFM"
|
|
font.pixelSize: 30
|
|
color: Colors.textPrimary
|
|
}
|
|
}
|
|
}
|
|
}
|