feat: optional tray
parent
f3975e6634
commit
d4b97d5d09
16
meson.build
16
meson.build
|
@ -32,7 +32,7 @@ wayland_cursor = dependency('wayland-cursor')
|
||||||
wayland_protos = dependency('wayland-protocols')
|
wayland_protos = dependency('wayland-protocols')
|
||||||
wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
|
wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
|
||||||
gtkmm = dependency('gtkmm-3.0')
|
gtkmm = dependency('gtkmm-3.0')
|
||||||
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4')
|
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4', required: get_option('dbusmenu-gtk'))
|
||||||
jsoncpp = dependency('jsoncpp')
|
jsoncpp = dependency('jsoncpp')
|
||||||
sigcpp = dependency('sigc++-2.0')
|
sigcpp = dependency('sigc++-2.0')
|
||||||
libnl = dependency('libnl-3.0', required: get_option('libnl'))
|
libnl = dependency('libnl-3.0', required: get_option('libnl'))
|
||||||
|
@ -47,10 +47,6 @@ src_files = files(
|
||||||
'src/modules/clock.cpp',
|
'src/modules/clock.cpp',
|
||||||
'src/modules/custom.cpp',
|
'src/modules/custom.cpp',
|
||||||
'src/modules/cpu.cpp',
|
'src/modules/cpu.cpp',
|
||||||
'src/modules/sni/tray.cpp',
|
|
||||||
'src/modules/sni/snw.cpp',
|
|
||||||
'src/modules/sni/snh.cpp',
|
|
||||||
'src/modules/sni/sni.cpp',
|
|
||||||
'src/main.cpp',
|
'src/main.cpp',
|
||||||
'src/bar.cpp',
|
'src/bar.cpp',
|
||||||
'src/client.cpp'
|
'src/client.cpp'
|
||||||
|
@ -75,6 +71,16 @@ if libpulse.found()
|
||||||
src_files += 'src/modules/pulseaudio.cpp'
|
src_files += 'src/modules/pulseaudio.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if dbusmenu_gtk.found()
|
||||||
|
add_project_arguments('-DHAVE_DBUSMENU', language: 'cpp')
|
||||||
|
src_files += files(
|
||||||
|
'src/modules/sni/tray.cpp',
|
||||||
|
'src/modules/sni/snw.cpp',
|
||||||
|
'src/modules/sni/snh.cpp',
|
||||||
|
'src/modules/sni/sni.cpp'
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('protocol')
|
subdir('protocol')
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
option('libnl', type: 'feature', value: 'auto', description: 'Enable libnl support for network related features')
|
option('libnl', type: 'feature', value: 'auto', description: 'Enable libnl support for network related features')
|
||||||
option('pulseaudio', type: 'feature', value: 'auto', description: 'Enable support for pulseaudio')
|
option('pulseaudio', type: 'feature', value: 'auto', description: 'Enable support for pulseaudio')
|
||||||
|
option('dbusmenu-gtk', type: 'feature', value: 'auto', description: 'Enable support for tray')
|
|
@ -27,9 +27,11 @@ waybar::IModule* waybar::Factory::makeModule(const std::string &name) const
|
||||||
if (name == "clock") {
|
if (name == "clock") {
|
||||||
return new waybar::modules::Clock(config_[name]);
|
return new waybar::modules::Clock(config_[name]);
|
||||||
}
|
}
|
||||||
|
#ifdef DHAVE_DBUSMENU
|
||||||
if (name == "tray") {
|
if (name == "tray") {
|
||||||
return new waybar::modules::SNI::Tray(config_[name]);
|
return new waybar::modules::SNI::Tray(config_[name]);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef HAVE_LIBNL
|
#ifdef HAVE_LIBNL
|
||||||
if (name == "network") {
|
if (name == "network") {
|
||||||
return new waybar::modules::Network(config_[name]);
|
return new waybar::modules::Network(config_[name]);
|
||||||
|
|
Loading…
Reference in New Issue