diff --git a/meson.build b/meson.build index e2c332b..e40f488 100644 --- a/meson.build +++ b/meson.build @@ -147,6 +147,7 @@ yambar = executable( plugin_pipewire_enabled ? '-DPLUGIN_ENABLED_PIPEWIRE' : [], plugin_pulse_enabled ? '-DPLUGIN_ENABLED_PULSE' : [], plugin_removables_enabled ? '-DPLUGIN_ENABLED_REMOVABLES' : [], + plugin_river_enabled ? '-DPLUGIN_ENABLED_RIVER' : [], plugin_script_enabled ? '-DPLUGIN_ENABLED_SCRIPT' : [], plugin_sway_xkb_enabled ? '-DPLUGIN_ENABLED_SWAY_XKB' : [], plugin_xkb_enabled ? '-DPLUGIN_ENABLED_XKB' : [], @@ -204,6 +205,7 @@ summary( 'Pipewire': plugin_pipewire_enabled, 'PulseAudio': plugin_pulse_enabled, 'Removables monitoring': plugin_removables_enabled, + 'River': plugin_river_enabled, 'Script': plugin_script_enabled, 'Sway XKB keyboard': plugin_sway_xkb_enabled, 'XKB keyboard (for X11)': plugin_xkb_enabled, diff --git a/meson_options.txt b/meson_options.txt index 46c0abb..e5ab795 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,6 +36,8 @@ option('plugin-pulse', type: 'feature', value: 'auto', description: 'PulseAudio support') option('plugin-removables', type: 'feature', value: 'auto', description: 'Removables (USB sticks, CD-ROM etc) monitoring support') +option('plugin-river', type: 'feature', value: 'auto', + description: 'River support') option('plugin-script', type: 'feature', value: 'auto', description: 'Script support') option('plugin-sway-xkb', type: 'feature', value: 'auto', diff --git a/modules/meson.build b/modules/meson.build index f1c8f41..933a195 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -37,6 +37,8 @@ plugin_pulse_enabled = pulse.found() udev_removables = dependency('udev', required: get_option('plugin-removables')) plugin_removables_enabled = udev_removables.found() +plugin_river_enabled = backend_wayland and get_option('plugin-river').allowed() + plugin_script_enabled = get_option('plugin-script').allowed() json_sway_xkb = dependency('json-c', required: get_option('plugin-sway-xkb')) @@ -126,7 +128,7 @@ if plugin_xwindow_enabled mod_data += {'xwindow': [[], [xcb_stuff]]} endif -if backend_wayland +if plugin_river_enabled river_proto_headers = [] river_proto_src = [] @@ -145,10 +147,10 @@ if backend_wayland command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@']) endforeach - mod_data += { - 'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]], - } + mod_data += {'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]]} +endif +if backend_wayland ftop_proto_headers = [] ftop_proto_src = [] diff --git a/plugin.c b/plugin.c index b7fc913..7e47ee7 100644 --- a/plugin.c +++ b/plugin.c @@ -78,6 +78,9 @@ EXTERN_MODULE(pulse); #if defined(PLUGIN_ENABLED_REMOVABLES) EXTERN_MODULE(removables); #endif +#if defined(PLUGIN_ENABLED_RIVER) +EXTERN_MODULE(river); +#endif #if defined(PLUGIN_ENABLED_SCRIPT) EXTERN_MODULE(script); #endif @@ -90,7 +93,6 @@ EXTERN_MODULE(xkb); #if defined(PLUGIN_ENABLED_XWINDOW) EXTERN_MODULE(xwindow); #endif -EXTERN_MODULE(river); EXTERN_PARTICLE(empty); EXTERN_PARTICLE(list); @@ -202,6 +204,9 @@ init(void) #if defined(PLUGIN_ENABLED_REMOVABLES) REGISTER_CORE_MODULE(removables, removables); #endif +#if defined(PLUGIN_ENABLED_RIVER) + REGISTER_CORE_MODULE(river, river); +#endif #if defined(PLUGIN_ENABLED_SCRIPT) REGISTER_CORE_MODULE(script, script); #endif @@ -214,9 +219,6 @@ init(void) #if defined(PLUGIN_ENABLED_XWINDOW) REGISTER_CORE_MODULE(xwindow, xwindow); #endif -#if defined(HAVE_PLUGIN_river) - REGISTER_CORE_MODULE(river, river); -#endif REGISTER_CORE_PARTICLE(empty, empty); REGISTER_CORE_PARTICLE(list, list);