mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
meson: make ‘foreign-toplevel’ plugin compile time optional
This commit is contained in:
parent
56b0047004
commit
9ef6d73663
4 changed files with 12 additions and 7 deletions
|
@ -139,6 +139,7 @@ yambar = executable(
|
||||||
plugin_cpu_enabled ? '-DPLUGIN_ENABLED_CPU' : [],
|
plugin_cpu_enabled ? '-DPLUGIN_ENABLED_CPU' : [],
|
||||||
plugin_disk_io_enabled ? '-DPLUGIN_ENABLED_DISK_IO' : [],
|
plugin_disk_io_enabled ? '-DPLUGIN_ENABLED_DISK_IO' : [],
|
||||||
plugin_dwl_enabled ? '-DPLUGIN_ENABLED_DWL' : [],
|
plugin_dwl_enabled ? '-DPLUGIN_ENABLED_DWL' : [],
|
||||||
|
plugin_foreign_toplevel_enabled ? '-DPLUGIN_ENABLED_FOREIGN_TOPLEVEL' : [],
|
||||||
plugin_mem_enabled ? '-DPLUGIN_ENABLED_MEM' : [],
|
plugin_mem_enabled ? '-DPLUGIN_ENABLED_MEM' : [],
|
||||||
plugin_mpd_enabled ? '-DPLUGIN_ENABLED_MPD' : [],
|
plugin_mpd_enabled ? '-DPLUGIN_ENABLED_MPD' : [],
|
||||||
plugin_i3_enabled ? '-DPLUGIN_ENABLED_I3' : [],
|
plugin_i3_enabled ? '-DPLUGIN_ENABLED_I3' : [],
|
||||||
|
@ -197,6 +198,7 @@ summary(
|
||||||
'CPU monitoring': plugin_cpu_enabled,
|
'CPU monitoring': plugin_cpu_enabled,
|
||||||
'Disk I/O monitoring': plugin_disk_io_enabled,
|
'Disk I/O monitoring': plugin_disk_io_enabled,
|
||||||
'DWL (dwm for Wayland)': plugin_dwl_enabled,
|
'DWL (dwm for Wayland)': plugin_dwl_enabled,
|
||||||
|
'Foreign toplevel (window tracking for Wayland)': plugin_foreign_toplevel_enabled,
|
||||||
'Memory monitoring': plugin_mem_enabled,
|
'Memory monitoring': plugin_mem_enabled,
|
||||||
'Music Player Daemon (MPD)': plugin_mpd_enabled,
|
'Music Player Daemon (MPD)': plugin_mpd_enabled,
|
||||||
'i3+Sway': plugin_i3_enabled,
|
'i3+Sway': plugin_i3_enabled,
|
||||||
|
@ -209,7 +211,7 @@ summary(
|
||||||
'Script': plugin_script_enabled,
|
'Script': plugin_script_enabled,
|
||||||
'Sway XKB keyboard': plugin_sway_xkb_enabled,
|
'Sway XKB keyboard': plugin_sway_xkb_enabled,
|
||||||
'XKB keyboard (for X11)': plugin_xkb_enabled,
|
'XKB keyboard (for X11)': plugin_xkb_enabled,
|
||||||
'XWindow': plugin_xwindow_enabled,
|
'XWindow (window tracking for X11)': plugin_xwindow_enabled,
|
||||||
},
|
},
|
||||||
section: 'Optional modules',
|
section: 'Optional modules',
|
||||||
bool_yn: true
|
bool_yn: true
|
||||||
|
|
|
@ -20,6 +20,8 @@ option('plugin-disk-io', type: 'feature', value: 'auto',
|
||||||
description: 'Disk I/O support')
|
description: 'Disk I/O support')
|
||||||
option('plugin-dwl', type: 'feature', value: 'auto',
|
option('plugin-dwl', type: 'feature', value: 'auto',
|
||||||
description: 'DWL (dwm for wayland) support')
|
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',
|
option('plugin-mem', type: 'feature', value: 'auto',
|
||||||
description: 'Memory monitoring support')
|
description: 'Memory monitoring support')
|
||||||
option('plugin-mpd', type: 'feature', value: 'auto',
|
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',
|
option('plugin-xkb', type: 'feature', value: 'auto',
|
||||||
description: 'keyboard support for X11')
|
description: 'keyboard support for X11')
|
||||||
option('plugin-xwindow', type: 'feature', value: 'auto',
|
option('plugin-xwindow', type: 'feature', value: 'auto',
|
||||||
description: 'XWindow support')
|
description: 'XWindow (window tracking for X11) support')
|
||||||
|
|
|
@ -16,6 +16,7 @@ plugin_clock_enabled = get_option('plugin-clock').allowed()
|
||||||
plugin_cpu_enabled = get_option('plugin-cpu').allowed()
|
plugin_cpu_enabled = get_option('plugin-cpu').allowed()
|
||||||
plugin_disk_io_enabled = get_option('plugin-disk-io').allowed()
|
plugin_disk_io_enabled = get_option('plugin-disk-io').allowed()
|
||||||
plugin_dwl_enabled = get_option('plugin-dwl').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()
|
plugin_mem_enabled = get_option('plugin-mem').allowed()
|
||||||
|
|
||||||
mpd = dependency('libmpdclient', required: get_option('plugin-mpd'))
|
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]]}
|
mod_data += {'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]]}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if backend_wayland
|
if plugin_foreign_toplevel_enabled
|
||||||
ftop_proto_headers = []
|
ftop_proto_headers = []
|
||||||
ftop_proto_src = []
|
ftop_proto_src = []
|
||||||
|
|
||||||
|
@ -169,9 +170,7 @@ if backend_wayland
|
||||||
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
mod_data += {
|
mod_data += {'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist, wayland_client]]}
|
||||||
'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist, wayland_client]],
|
|
||||||
}
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach mod, data : mod_data
|
foreach mod, data : mod_data
|
||||||
|
|
4
plugin.c
4
plugin.c
|
@ -53,7 +53,9 @@ EXTERN_MODULE(disk_io);
|
||||||
#if defined(PLUGIN_ENABLED_DWL)
|
#if defined(PLUGIN_ENABLED_DWL)
|
||||||
EXTERN_MODULE(dwl);
|
EXTERN_MODULE(dwl);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PLUGIN_ENABLED_FOREIGN_TOPLEVEL)
|
||||||
EXTERN_MODULE(foreign_toplevel);
|
EXTERN_MODULE(foreign_toplevel);
|
||||||
|
#endif
|
||||||
#if defined(PLUGIN_ENABLED_MEM)
|
#if defined(PLUGIN_ENABLED_MEM)
|
||||||
EXTERN_MODULE(mem);
|
EXTERN_MODULE(mem);
|
||||||
#endif
|
#endif
|
||||||
|
@ -177,7 +179,7 @@ init(void)
|
||||||
#if defined(PLUGIN_ENABLED_DWL)
|
#if defined(PLUGIN_ENABLED_DWL)
|
||||||
REGISTER_CORE_MODULE(dwl, dwl);
|
REGISTER_CORE_MODULE(dwl, dwl);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_PLUGIN_foreign_toplevel)
|
#if defined(PLUGIN_ENABLED_FOREIGN_TOPLEVEL)
|
||||||
REGISTER_CORE_MODULE(foreign-toplevel, foreign_toplevel);
|
REGISTER_CORE_MODULE(foreign-toplevel, foreign_toplevel);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLUGIN_ENABLED_MEM)
|
#if defined(PLUGIN_ENABLED_MEM)
|
||||||
|
|
Loading…
Add table
Reference in a new issue