feat: wireplumber support

Adds basic support for showing volume via wireplumber. Allows specifying
the node-id or falling back to the default Audio/Sink node id if node-id
is not set. If tooltip on hover is enabled, will show `{node_name}` by
default otherwise `tooltip-format`.

Format replacements:

`{volume}` - Volume in percentage
`{node_name}` - The node's nickname (`node.nick` property)
This commit is contained in:
Sasha Moak
2022-11-16 12:23:12 -08:00
parent 833dcc1bb8
commit c2f98d07ef
8 changed files with 325 additions and 0 deletions

View File

@ -101,6 +101,7 @@ libevdev = dependency('libevdev', required: get_option('libevdev'))
libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
xkbregistry = dependency('xkbregistry')
libjack = dependency('jack', required: get_option('jack'))
libwireplumber = dependency('wireplumber-0.4', required: get_option('wireplumber'))
libsndio = compiler.find_library('sndio', required: get_option('sndio'))
if libsndio.found()
@ -247,6 +248,11 @@ if libjack.found()
src_files += 'src/modules/jack.cpp'
endif
if libwireplumber.found()
add_project_arguments('-DHAVE_LIBWIREPLUMBER', language: 'cpp')
src_files += 'src/modules/wireplumber.cpp'
endif
if dbusmenu_gtk.found()
add_project_arguments('-DHAVE_DBUSMENU', language: 'cpp')
src_files += files(
@ -330,6 +336,7 @@ executable(
upower_glib,
libpulse,
libjack,
libwireplumber,
libudev,
libinotify,
libepoll,