add pipewire module
This commit is contained in:
parent
af77103d71
commit
eac2ed80e3
2 changed files with 28 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ Variants {
|
||||||
Mpris {
|
Mpris {
|
||||||
barHeight: root.implicitHeight
|
barHeight: root.implicitHeight
|
||||||
}
|
}
|
||||||
|
Pw {
|
||||||
|
barHeight: root.implicitHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
modules/bar/Pw.qml
Normal file
25
modules/bar/Pw.qml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
import Quickshell.Services.Pipewire
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import QtQuick
|
||||||
|
import qs
|
||||||
|
import qs.widgets
|
||||||
|
|
||||||
|
WrapperRectangle {
|
||||||
|
id: root
|
||||||
|
color: Colors.base01
|
||||||
|
required property int barHeight
|
||||||
|
property double vertMargin: barHeight / 4 - 4
|
||||||
|
property PwNode defaultAudio: Pipewire.ready ? Pipewire.defaultAudioSink : null
|
||||||
|
property string status: defaultAudio.audio.muted? "mut " : "vol "
|
||||||
|
topMargin: vertMargin
|
||||||
|
bottomMargin: vertMargin
|
||||||
|
leftMargin: 8
|
||||||
|
rightMargin: 8
|
||||||
|
PwObjectTracker {
|
||||||
|
objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null]
|
||||||
|
}
|
||||||
|
child: StyledText {
|
||||||
|
text: root.status + Math.floor(root.defaultAudio.audio.volume * 100) + "%"
|
||||||
|
opacity: root.defaultAudio.audio.muted ? 0.6 : 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue