mixer: add example
This commit is contained in:
parent
b9e744b506
commit
7d0bfb6b61
4 changed files with 107 additions and 0 deletions
49
mixer/shell.qml
Normal file
49
mixer/shell.qml
Normal file
|
@ -0,0 +1,49 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Services.Pipewire
|
||||
|
||||
ShellRoot {
|
||||
FloatingWindow {
|
||||
// match the system theme background color
|
||||
color: contentItem.palette.active.window
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
contentWidth: availableWidth
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
|
||||
// get a list of nodes that output to the default sink
|
||||
PwNodeLinkTracker {
|
||||
id: linkTracker
|
||||
node: Pipewire.defaultAudioSink
|
||||
}
|
||||
|
||||
MixerEntry {
|
||||
node: Pipewire.defaultAudioSink
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: palette.active.text
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: linkTracker.linkGroups
|
||||
|
||||
MixerEntry {
|
||||
required property PwLinkGroup modelData
|
||||
// Each link group contains a source and a target.
|
||||
// Since the target is the default sink, we want the source.
|
||||
node: modelData.source
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue