eww/examples/eww-bar/scripts/getvol

7 lines
219 B
Bash
Executable file

#!/bin/sh
if command -v pactl &>/dev/null; then
pactl get-sink-volume $(pactl get-default-sink) | awk -F '[^0-9]+' '/left:/{print $3}'
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi