brightess and volume control
This commit is contained in:
44
Widgets/Volume.qml
Normal file
44
Widgets/Volume.qml
Normal file
@@ -0,0 +1,44 @@
|
||||
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
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user