finish volume icon

This commit is contained in:
Sem
2026-05-31 21:43:28 +02:00
parent 8dd32e2632
commit f59959c871
4 changed files with 51 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ Item {
// process to get the volume level: first active playback stream, falling back to the sink
Process {
id: audioVolumeProcess
command: ["sh", "-c", "pactl list sink-inputs | grep -m1 'Volume:' | grep -oP '\\d+(?=%)' | head -1 || wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{printf \"%d\", $2 * 100}'"]
command: ["sh", "-c", "vol=$(pactl list sink-inputs | grep -m1 'Volume:' | grep -oP '\\d+(?=%)' | head -1); [ -n \"$vol\" ] && echo \"$vol\" || wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{printf \"%d\", $2 * 100}'"]
stdout: StdioCollector {
onStreamFinished: {
if (this.text) {