diff --git a/meson.build b/meson.build index e40f488..4e14277 100644 --- a/meson.build +++ b/meson.build @@ -139,6 +139,7 @@ yambar = executable( plugin_cpu_enabled ? '-DPLUGIN_ENABLED_CPU' : [], plugin_disk_io_enabled ? '-DPLUGIN_ENABLED_DISK_IO' : [], plugin_dwl_enabled ? '-DPLUGIN_ENABLED_DWL' : [], + plugin_foreign_toplevel_enabled ? '-DPLUGIN_ENABLED_FOREIGN_TOPLEVEL' : [], plugin_mem_enabled ? '-DPLUGIN_ENABLED_MEM' : [], plugin_mpd_enabled ? '-DPLUGIN_ENABLED_MPD' : [], plugin_i3_enabled ? '-DPLUGIN_ENABLED_I3' : [], @@ -197,6 +198,7 @@ summary( 'CPU monitoring': plugin_cpu_enabled, 'Disk I/O monitoring': plugin_disk_io_enabled, 'DWL (dwm for Wayland)': plugin_dwl_enabled, + 'Foreign toplevel (window tracking for Wayland)': plugin_foreign_toplevel_enabled, 'Memory monitoring': plugin_mem_enabled, 'Music Player Daemon (MPD)': plugin_mpd_enabled, 'i3+Sway': plugin_i3_enabled, @@ -209,7 +211,7 @@ summary( 'Script': plugin_script_enabled, 'Sway XKB keyboard': plugin_sway_xkb_enabled, 'XKB keyboard (for X11)': plugin_xkb_enabled, - 'XWindow': plugin_xwindow_enabled, + 'XWindow (window tracking for X11)': plugin_xwindow_enabled, }, section: 'Optional modules', bool_yn: true diff --git a/meson_options.txt b/meson_options.txt index e5ab795..03c0ead 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,6 +20,8 @@ option('plugin-disk-io', type: 'feature', value: 'auto', description: 'Disk I/O support') option('plugin-dwl', type: 'feature', value: 'auto', description: 'DWL (dwm for wayland) support') +option('plugin-foreign-toplevel', type: 'feature', value: 'auto', + description: 'Foreign toplevel (window tracking for Wayland) support') option('plugin-mem', type: 'feature', value: 'auto', description: 'Memory monitoring support') option('plugin-mpd', type: 'feature', value: 'auto', @@ -45,4 +47,4 @@ option('plugin-sway-xkb', type: 'feature', value: 'auto', option('plugin-xkb', type: 'feature', value: 'auto', description: 'keyboard support for X11') option('plugin-xwindow', type: 'feature', value: 'auto', - description: 'XWindow support') + description: 'XWindow (window tracking for X11) support') diff --git a/modules/meson.build b/modules/meson.build index 933a195..f14b3df 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -16,6 +16,7 @@ plugin_clock_enabled = get_option('plugin-clock').allowed() plugin_cpu_enabled = get_option('plugin-cpu').allowed() plugin_disk_io_enabled = get_option('plugin-disk-io').allowed() plugin_dwl_enabled = get_option('plugin-dwl').allowed() +plugin_foreign_toplevel_enabled = backend_wayland and get_option('plugin-foreign-toplevel').allowed() plugin_mem_enabled = get_option('plugin-mem').allowed() mpd = dependency('libmpdclient', required: get_option('plugin-mpd')) @@ -150,7 +151,7 @@ if plugin_river_enabled mod_data += {'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]]} endif -if backend_wayland +if plugin_foreign_toplevel_enabled ftop_proto_headers = [] ftop_proto_src = [] @@ -169,9 +170,7 @@ if backend_wayland command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@']) endforeach - mod_data += { - 'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist, wayland_client]], - } + mod_data += {'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist, wayland_client]]} endif foreach mod, data : mod_data diff --git a/plugin.c b/plugin.c index 7e47ee7..93fa771 100644 --- a/plugin.c +++ b/plugin.c @@ -53,7 +53,9 @@ EXTERN_MODULE(disk_io); #if defined(PLUGIN_ENABLED_DWL) EXTERN_MODULE(dwl); #endif +#if defined(PLUGIN_ENABLED_FOREIGN_TOPLEVEL) EXTERN_MODULE(foreign_toplevel); +#endif #if defined(PLUGIN_ENABLED_MEM) EXTERN_MODULE(mem); #endif @@ -177,7 +179,7 @@ init(void) #if defined(PLUGIN_ENABLED_DWL) REGISTER_CORE_MODULE(dwl, dwl); #endif -#if defined(HAVE_PLUGIN_foreign_toplevel) +#if defined(PLUGIN_ENABLED_FOREIGN_TOPLEVEL) REGISTER_CORE_MODULE(foreign-toplevel, foreign_toplevel); #endif #if defined(PLUGIN_ENABLED_MEM)