yambar/modules
Daniel Eklöf 6c10eb2153
module/alsa: use channel’s dB range instead of raw volume, if available
For channels that have a defined dB range, use that instead of the raw
volume range when calculating the volume percent.

Also use the same logic as alsamixer when calculating the percent from
the dB values: assume a linear scale if the dB range is “small
enough”, and otherwise normalize it against a logarithmic scale.

With this, yambar’s “percent” value matches alsamixer’s exactly.

The ‘volume’ tag remains unchanged - it always reflects the raw volume
values.

Instead, we add a new tag ‘dB’, that reflects the dB values.

Closes #202
2022-06-21 19:49:06 +02:00
..
alsa.c module/alsa: use channel’s dB range instead of raw volume, if available 2022-06-21 19:49:06 +02:00
backlight.c module/backlight: handle poll() failures 2021-12-17 11:23:59 +01:00
battery.c module/battery: handle poll() failures 2021-12-17 11:25:37 +01:00
clock.c module/clock: handle poll() failures 2021-12-17 11:55:31 +01:00
cpu.c module/cpu: don’t use core ID from /proc/stat as array index 2022-04-07 13:28:35 +02:00
disk-io.c modules: creates disk-io-module 2022-06-17 12:04:13 -03:00
foreign-toplevel.c foreign-toplevel: refresh the bar when a top-level is closed 2021-10-17 09:52:28 +02:00
i3-common.c module/i3-common: fix compilation warning with asan 2020-07-07 14:06:29 +02:00
i3-common.h modules/sway-xkb: new module, uses sway 'input' events to expose kbd layout 2019-08-14 21:51:43 +02:00
i3-ipc.h module/i3: use our own copy of i3/ipc.h 2019-03-31 12:08:44 +02:00
i3.c module/i3: if a new workspace is created, but unfocused, assume it’s not empty 2022-06-11 11:59:41 +02:00
label.c modules: implement description() 2021-06-20 21:15:24 +02:00
mem.c modules: add mem module 2021-12-21 18:44:14 +01:00
meson.build modules: creates disk-io-module 2022-06-17 12:04:13 -03:00
mpd.c modules: add SOCK_CLOEXEC to all socket() calls 2022-03-29 18:21:13 +02:00
network.c module/network: Add link stats 2022-06-06 15:11:24 +02:00
removables.c module/removables: open /proc/self/mountinfo with CLOEXEC 2022-03-29 18:21:44 +02:00
river.c module/river: add support for the ‘mode’ event 2022-06-02 17:24:42 +02:00
script.c Don’t loop 65536 FDs, trying to close them, when fork+exec:ing 2022-03-29 18:23:55 +02:00
sway-xkb.c module/sway-xkb: handle device being added again 2022-06-03 19:37:52 +02:00
xkb.c module/xkb: handle poll() failures 2021-12-17 11:55:38 +01:00
xwindow.c module/xwindow: handle poll() failures 2021-12-17 11:55:38 +01:00