forked from external/yambar
* Bind the foreign-toplevel-manager object *after* the first round of global objects. This ensures we bind all pre-existing wl-output objects before binding the toplevel manager. This is important, since otherwise we wont get any output_enter() events for the initial set of toplevels. * Bind xdg-output-manager, to be able to bind xdg-output objects for each wl-output. * Add xdg-output-listener to each wl/xdg-output, to be able to get the outputs’ names. * Add a list of outputs to each toplevel. The output_enter() event adds to this list, and output_leave() removes from it. * Add option ‘all-monitors’. When not set (the default), toplevels are only included in the generated content if they are mapped on the same output as the bar itself. When *not* set, all toplevels are always included in the generated content.
95 lines
2.7 KiB
Meson
95 lines
2.7 KiB
Meson
module_sdk = declare_dependency(dependencies: [pixman, threads, tllist, fcft])
|
|
|
|
modules = []
|
|
|
|
alsa = dependency('alsa')
|
|
udev = dependency('libudev')
|
|
json = dependency('json-c')
|
|
mpd = dependency('libmpdclient')
|
|
xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11'))
|
|
|
|
# Module name -> (source-list, dep-list)
|
|
mod_data = {
|
|
'alsa': [[], [m, alsa]],
|
|
'backlight': [[], [m, udev]],
|
|
'battery': [[], [udev]],
|
|
'clock': [[], []],
|
|
'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
|
'label': [[], []],
|
|
'mpd': [[], [mpd]],
|
|
'network': [[], []],
|
|
'removables': [[], [dynlist, udev]],
|
|
'script': [[], []],
|
|
'sway-xkb': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
|
}
|
|
|
|
if backend_x11
|
|
mod_data += {
|
|
'xkb': [[], [xcb_stuff, xcb_xkb]],
|
|
'xwindow': [[], [xcb_stuff]],
|
|
}
|
|
endif
|
|
|
|
if backend_wayland
|
|
river_proto_headers = []
|
|
river_proto_src = []
|
|
|
|
foreach prot : ['../external/river-status-unstable-v1.xml']
|
|
|
|
river_proto_headers += custom_target(
|
|
prot.underscorify() + '-client-header',
|
|
output: '@BASENAME@.h',
|
|
input: prot,
|
|
command: [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@'])
|
|
|
|
river_proto_src += custom_target(
|
|
prot.underscorify() + '-private-code',
|
|
output: '@BASENAME@.c',
|
|
input: prot,
|
|
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
|
endforeach
|
|
|
|
mod_data += {
|
|
'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist]],
|
|
}
|
|
|
|
ftop_proto_headers = []
|
|
ftop_proto_src = []
|
|
|
|
foreach prot : ['../external/wlr-foreign-toplevel-management-unstable-v1.xml']
|
|
|
|
ftop_proto_headers += custom_target(
|
|
prot.underscorify() + '-client-header',
|
|
output: '@BASENAME@.h',
|
|
input: prot,
|
|
command: [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@'])
|
|
|
|
ftop_proto_src += custom_target(
|
|
prot.underscorify() + '-private-code',
|
|
output: '@BASENAME@.c',
|
|
input: prot,
|
|
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]],
|
|
}
|
|
endif
|
|
|
|
foreach mod, data : mod_data
|
|
sources = data[0]
|
|
deps = data[1]
|
|
|
|
if plugs_as_libs
|
|
shared_module(mod, '@0@.c'.format(mod), sources,
|
|
dependencies: [module_sdk] + deps,
|
|
name_prefix: 'module_',
|
|
install: true,
|
|
install_dir: join_paths(get_option('libdir'), 'yambar'))
|
|
else
|
|
modules += [declare_dependency(
|
|
sources: ['@0@.c'.format(mod)] + sources,
|
|
dependencies: [module_sdk] + deps,
|
|
compile_args: '-DHAVE_PLUGIN_@0@'.format(mod.underscorify()))]
|
|
endif
|
|
endforeach
|