mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 17:47:09 +00:00
35 lines
644 B
QML
35 lines
644 B
QML
import qs.config
|
|
import qs.modules.components
|
|
import qs.services
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import Quickshell.Services.Pipewire
|
|
import Quickshell.Widgets
|
|
import QtQuick.Controls
|
|
|
|
|
|
StyledSlider {
|
|
id: volSlider
|
|
Layout.fillWidth: true
|
|
from: 0
|
|
to: 1
|
|
stepSize: 0.01
|
|
value: sink ? sink.volume : 0
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
|
|
property real level: volSlider.value * 100
|
|
|
|
PwObjectTracker {
|
|
objects: [Pipewire.defaultAudioSink]
|
|
}
|
|
|
|
property var sink: Pipewire.defaultAudioSink?.audio
|
|
|
|
|
|
onMoved: {
|
|
if (sink) sink.volume = value
|
|
}
|
|
}
|