ALSA master volume display in tint2 executor

awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master)
# or without the percentage sign
awk -F"[^0-9]*" '/dB/ { print $3 }' <(amixer sget Master)

https://unix.stackexchange.com/questions/89571/how-to-get-volume-level-from-the-command-line

Wanted

--------------|---
or
---------+---
or
────────────│──
or
────────────86──

Solution

A bash script like this printVolCont, and tint2rc like this (You will want latest tint2 version from git).

Behaviour

Left of Right mouse click on it in tint2 will raise/lower volume by 5%.
Mouse scroll up/down will raise/lower volume by 1%.
Middle mouse click will toggle mute.

https://forums.bunsenlabs.org/viewtopic.php?pid=52826#p52826
https://gitlab.com/o9000/tint2/blob/master/doc/tint2.md#executor

printVolumeTint2Slider.th.png printVol2.th.png 2017-06-02-175339_1920x1200_scrot.th.png

changelog: Changed all the logic to continous, thanks to tint2 developer o9000.

2018 added Pulseaudio support

https://forums.bunsenlabs.org/viewtopic.php?pid=69546

about / github / jekyll