61 lines
1.8 KiB
QML
Executable File
61 lines
1.8 KiB
QML
Executable File
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.Widgets
|
|
import Quickshell.Services.Pipewire
|
|
import "common" as Common
|
|
|
|
|
|
Item {
|
|
id: root
|
|
property PwNode speakerNode: Pipewire.defaultAudioSink
|
|
property PwNode microphoneNode: Pipewire.defaultAudioSource
|
|
PwObjectTracker { objects: [ root.microphoneNode, root.speakerNode ] }
|
|
|
|
width: row.width
|
|
height: row.height
|
|
|
|
// console.log("a");
|
|
|
|
RowLayout {
|
|
id: row
|
|
Item {
|
|
implicitWidth: 28
|
|
implicitHeight: 28
|
|
Rectangle {
|
|
width: parent.width
|
|
height: parent.height
|
|
radius: 7
|
|
color: "black"
|
|
}
|
|
Text {
|
|
anchors.centerIn: parent
|
|
// implicitSize: 25
|
|
font.pixelSize: 28
|
|
color: root.speakerNode.audio.muted ? "#FF474C" : "white"
|
|
font.family: "CaskaydiaCove Nerd Font Mono"
|
|
text: root.speakerNode.audio.muted ? Common.Icons.audioIcons.speakerMuted : Common.Icons.audioIcons.speaker
|
|
}
|
|
}
|
|
Item {
|
|
implicitWidth: 28
|
|
implicitHeight: 28
|
|
Rectangle {
|
|
width: parent.width
|
|
height: parent.height
|
|
radius: 7
|
|
color: "black"
|
|
}
|
|
Text {
|
|
anchors.centerIn: parent
|
|
// implicitSize: 25
|
|
font.pixelSize: 34
|
|
color: root.microphoneNode.audio.muted ? "#FF474C" : "white"
|
|
font.family: "CaskaydiaCove Nerd Font Mono"
|
|
text: root.microphoneNode.audio.muted ? Common.Icons.audioIcons.microphoneMuted : Common.Icons.audioIcons.microphone
|
|
}
|
|
}
|
|
}
|
|
}
|