brightess and volume control

This commit is contained in:
2026-03-26 13:15:54 -07:00
parent 80efc104ed
commit 5b8d82a934
20 changed files with 588 additions and 37 deletions

44
Widgets/Volume.qml Normal file
View 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
}}
}