commit 2040e8cab02d49f0deb62f9f14a51272280250bc parent 5297dda62baf7ddc0ab527d1e3b8a7a219381c56 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sun, 29 Sep 2019 21:33:13 +0200 Show volume in percent Diffstat:
M | .local/bin/sysstatus | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus @@ -18,7 +18,8 @@ if type mixerctl >/dev/null 2>&1; then else printf " M " fi - printf "%s" "$(mixerctl -n outputs.master | sed 's/,.*//')%" + printf "%s" "$(echo $(mixerctl -n outputs.master | \ + sed 's/,.*//')/255*100 | bc -l | sed 's/\..*//')%" elif type amixer >/dev/null 2>&1; then printf " ♪ %s" "$(amixer get Master | grep -o "[0-9]*%\|\[off\]")" elif type pulsemixer >/dev/null 2>&1; then