import QtQuick import Quickshell.Services.Pipewire import "classes" import "../.." BarText { id: volume_indicator PwObjectTracker { objects: [Pipewire.defaultAudioSink] } property var muted: Pipewire.defaultAudioSink?.audio.muted property var vol: Math.round((Pipewire.defaultAudioSink?.audio.volume ?? 0) * 100) text: '' + Icons.volume.low + " " + vol + "%" } // TopbarIcon { // text: (muted) // ? "" // : (volume_indicator.vol == 0) // ? "" // : (volume_indicator.vol <= 50) // ? "󰺕" // : (volume_indicator.vol > 50) // ? "" // : Icons.volume.low // color: (muted) // ? Resources.palette.scarlet // : Resources.palette.orange // bottomPadding: 0.5 // }