45 lines
1.0 KiB
QML
45 lines
1.0 KiB
QML
import Quickshell
|
|
import QtQuick.Shapes
|
|
import Quickshell.Services.Pipewire
|
|
import QtQuick
|
|
|
|
Item {
|
|
anchors {
|
|
top: parent.top
|
|
bottom: parent.bottom
|
|
}
|
|
width: children[1].width + 16
|
|
|
|
PwObjectTracker {
|
|
objects: [Pipewire.defaultAudioSink]
|
|
}
|
|
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
anchors.margins: 4
|
|
anchors.leftMargin: 2
|
|
anchors.rightMargin: 2
|
|
color: hover.hovered ? "#11ffffff" : "#00ffffff"
|
|
Behavior on color {ColorAnimation {duration: 150}}
|
|
radius: 8
|
|
}
|
|
PercentIndicator {
|
|
x: 8
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: 26
|
|
height: width
|
|
percent: Pipewire.defaultAudioSink.audio.volume
|
|
Image {
|
|
anchors.centerIn: parent
|
|
width: 20
|
|
height: width
|
|
sourceSize {width: width; height: height}
|
|
source: Quickshell.iconPath("volume-level-high")
|
|
}
|
|
}
|
|
HoverHandler {id: hover}
|
|
TapHandler {onTapped: {
|
|
background.index = 5
|
|
}}
|
|
}
|