yambar/modules
Daniel Eklöf d9316a202d
module/removables: audio CD support
Audio CDs are special, in that they don’t (usually) have any data
partitions. They also don’t have a volume label. They just have
tracks.

Before this patch, we ignored all optical mediums that did *not* have
a filesystem (that includes audio CDs).

Now, instead of using the ID_FS_USAGE property to determine whether
there’s media present in the CD-ROM or not, we use the
ID_CDROM_MEDIA. This property is set to ‘1’ for both audio CDs and
data CDs.

Then, we read the ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property to
determine how many audio tracks there are.

If the CD has a filesystem, we treat it as a data CD, and use the
already existing add_partition() function to track it.

If the CD does _not_ have a filesystem, but it _does_ have at least
one audio track, we treat it as an audio CD and use the new
add_audio_cd() function to track it.

This function is almost identical to add_partition(), but instead of
reading the ID_FS_LABEL property, it reads the
ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property and synthesizes a label on
the form “Audio CD - N tracks”.

Finally, a new boolean tag, “audio”, has been added. It is set to true
for audio CD “partitions”, and to false in all other cases.
2021-12-26 12:22:54 +01:00
..
alsa.c module/alsa: add support for capture devices 2021-08-26 11:03:12 +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 modules: add cpu module 2021-12-21 18:44:36 +01: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: add ‘empty’ boolean tag 2021-12-19 17:54:40 +01: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: add cpu module 2021-12-21 18:44:36 +01:00
mpd.c module/mpd: handle poll() failures 2021-12-17 11:55:36 +01:00
network.c modules: verify: use conf_verify_unsigned() for options that should be >= 0 2021-11-15 18:17:29 +01:00
removables.c module/removables: audio CD support 2021-12-26 12:22:54 +01:00
river.c module/river: rename the ‘per-output’ option to ‘all-monitors’ 2021-08-25 18:47:33 +02:00
script.c modules: verify: use conf_verify_unsigned() for options that should be >= 0 2021-11-15 18:17:29 +01:00
sway-xkb.c modules: verify: use conf_verify_unsigned() for options that should be >= 0 2021-11-15 18:17:29 +01: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