quickshell restruct and work

This commit is contained in:
2025-07-27 17:05:34 +01:00
parent aa612919ec
commit 57689e5f8b
21 changed files with 505 additions and 219 deletions

View File

@@ -0,0 +1,47 @@
import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Layouts
import Quickshell.Widgets
import Quickshell.Services.Pipewire
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
IconImage {
// anchors.centerIn: parent
implicitSize: 27
source: "root:/assets/bar/Speaker.svg"
}
Text {
id: text
text: root.speakerNode.audio.muted ? "0%" : root.speakerNode.audio.volume * 100 + "%"
font.pointSize: 10.75
color: root.speakerNode.audio.muted ? "red" : "#FFFFFF"
}
IconImage {
implicitSize: 26
source: "root:/assets/bar/Mic.svg"
}
Text {
text: parseInt(root.microphoneNode.audio.muted ? "0" : root.microphoneNode.audio.volume * 100) + "%"
font.pointSize: 10.75
color: root.microphoneNode.audio.muted ? "red" : "#FFFFFF"
}
}
}