added audio to qs && nix flake update
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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]
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ Scope {
|
||||
Layout.preferredHeight: 20
|
||||
// spacing: 100
|
||||
spacing: 10
|
||||
Audio {}
|
||||
BatteryWidget {}
|
||||
Rectangle {
|
||||
implicitWidth: clockText.width
|
||||
|
||||
@@ -13,7 +13,6 @@ Singleton {
|
||||
if (x.id == id) {
|
||||
return x;
|
||||
}
|
||||
print(x);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user