bin - Personal scripts
ssh://anon@thyssentishman.com/bin
Log | Files | Refs | Feed | Contribute | README

Commit: 2f2d8b4aecfcae21b197db35adb9aa1ded7e3504
Parent: 3729c77b4f2a8ccfaf52df8df9ea9c0613b7969d
Author: Johannes Thyssen Tishman
Date:   Fri, 27 Sep 2024 09:25:22 +0000

statusbar: Symbolize when volume is muted

Diffstat:
M statusbar | 2 ++

1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/statusbar b/statusbar
@@ -38,6 +38,8 @@ volume() {
 	value=$(printf '%s * 100\n' "$(sndioctl -n output.level)" | bc)
 	label='VOL'
 	unit='%'
+	state=$(sndioctl -n output.mute)
+	[ "$state" -eq 1 ] && unit='% (M)'
 	draw "$label" "$value" "$unit"
 }