Update eww volume meter to work with Pipewire
This commit is contained in:
parent
475fab115d
commit
be47278110
|
@ -7,8 +7,8 @@
|
||||||
(defwidget sidestuff []
|
(defwidget sidestuff []
|
||||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||||
(metric :label ""
|
(metric :label ""
|
||||||
:value volume
|
:value { volume * 100 }
|
||||||
:onchange "amixer -D pulse sset Master {}%")
|
:onchange "VOL=$(bc -l <<<\"scale=2; {} / 100\") ; wpctl set-volume @DEFAULT_AUDIO_SINK@ $VOL")
|
||||||
(metric :label ""
|
(metric :label ""
|
||||||
:value {EWW_RAM.used_mem_perc}
|
:value {EWW_RAM.used_mem_perc}
|
||||||
:onchange "")
|
:onchange "")
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if command -v pamixer &>/dev/null; then
|
wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}'
|
||||||
if [ true == $(pamixer --get-mute) ]; then
|
|
||||||
echo 0
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
pamixer --get-volume
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue