mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Add mpris module
Uses libplayerctl to use the MPRIS dbus protocol to query, listen and control media players. Signed-off-by: Robert Günzler <r@gnzler.io>
This commit is contained in:
13
meson.build
13
meson.build
@ -86,7 +86,10 @@ wayland_cursor = dependency('wayland-cursor')
|
||||
wayland_protos = dependency('wayland-protocols')
|
||||
gtkmm = dependency('gtkmm-3.0', version : ['>=3.22.0'])
|
||||
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4', required: get_option('dbusmenu-gtk'))
|
||||
giounix = dependency('gio-unix-2.0', required: (get_option('dbusmenu-gtk').enabled() or get_option('logind').enabled() or get_option('upower_glib').enabled()))
|
||||
giounix = dependency('gio-unix-2.0', required: (get_option('dbusmenu-gtk').enabled() or
|
||||
get_option('logind').enabled() or
|
||||
get_option('upower_glib').enabled() or
|
||||
get_option('mpris').enabled()))
|
||||
jsoncpp = dependency('jsoncpp', version : ['>=1.9.2'], fallback : ['jsoncpp', 'jsoncpp_dep'])
|
||||
sigcpp = dependency('sigc++-2.0')
|
||||
libinotify = dependency('libinotify', required: false)
|
||||
@ -95,6 +98,7 @@ libinput = dependency('libinput', required: get_option('libinput'))
|
||||
libnl = dependency('libnl-3.0', required: get_option('libnl'))
|
||||
libnlgen = dependency('libnl-genl-3.0', required: get_option('libnl'))
|
||||
upower_glib = dependency('upower-glib', required: get_option('upower_glib'))
|
||||
playerctl = dependency('playerctl', version : ['>=2.0.0'], required: get_option('mpris'))
|
||||
libpulse = dependency('libpulse', required: get_option('pulseaudio'))
|
||||
libudev = dependency('libudev', required: get_option('libudev'))
|
||||
libevdev = dependency('libevdev', required: get_option('libevdev'))
|
||||
@ -238,6 +242,11 @@ if (upower_glib.found() and giounix.found() and not get_option('logind').disable
|
||||
src_files += 'src/modules/upower/upower_tooltip.cpp'
|
||||
endif
|
||||
|
||||
if (playerctl.found() and giounix.found() and not get_option('logind').disabled())
|
||||
add_project_arguments('-DHAVE_MPRIS', language: 'cpp')
|
||||
src_files += 'src/modules/mpris/mpris.cpp'
|
||||
endif
|
||||
|
||||
if libpulse.found()
|
||||
add_project_arguments('-DHAVE_LIBPULSE', language: 'cpp')
|
||||
src_files += 'src/modules/pulseaudio.cpp'
|
||||
@ -334,6 +343,7 @@ executable(
|
||||
libnl,
|
||||
libnlgen,
|
||||
upower_glib,
|
||||
playerctl,
|
||||
libpulse,
|
||||
libjack,
|
||||
libwireplumber,
|
||||
@ -387,6 +397,7 @@ if scdoc.found()
|
||||
'waybar-keyboard-state.5.scd',
|
||||
'waybar-memory.5.scd',
|
||||
'waybar-mpd.5.scd',
|
||||
'waybar-mpris.5.scd',
|
||||
'waybar-network.5.scd',
|
||||
'waybar-pulseaudio.5.scd',
|
||||
'waybar-river-mode.5.scd',
|
||||
|
Reference in New Issue
Block a user