greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.85k stars 470 forks source link

sound: support wildcards in mappings #1902

Closed ptrcnull closed 1 year ago

ptrcnull commented 1 year ago

some of audio devices have very long names with serial numbers in them - for example, alsa_output.usb-Apple__Inc._USB-C_to_3.5mm_Headphone_Jack_Adapter_DWH2041023VL1MQAH-00.analog-stereo

in other cases, there's multiple HDMI outputs and the actual one changes with every reboot, with the device name being alsa_output.pci-0000_01_00.1.hdmi-stereo-extra<number>

with a wildcard, user could specify one name for all usb audio devices or all HDMI outputs

bim9262 commented 1 year ago

Wildcards are already supported for example alsa_output\.pci-0000_01_00\.1\.hdmi-stereo-extra.* should work. This feature has been enabled by default since 0.31.0

ptrcnull commented 1 year ago

oh, i didn't realize this got added recently, sorry :sweat_smile: