~jcc/swaybar-commander

e413e5f462027f11a65e78c638b925478c70b0f0 — Jason Cox 5 months ago 1d33afd
Update sample block to correctly handle volume=0

Print 0 instead of nothing.
1 files changed, 1 insertions(+), 1 deletions(-)

M sample-blocks.md
M sample-blocks.md => sample-blocks.md +1 -1
@@ 123,7 123,7 @@ Save the following as a script named `volume`, make it executable, and put it in
id=@DEFAULT_SINK@

get_volume() {
    wpctl get-volume "$id" | grep -E -o '[0-9.]*' | sed -e 's/\.//' -e 's/^0*//'
    wpctl get-volume "$id" | grep -E -o '[0-9.]*' | sed -e 's/\.//' -e 's/^0*\([0-9]\+\)/\1/'
}

is_muted() {