mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat: optional tray
This commit is contained in:
parent
f3975e6634
commit
d4b97d5d09
16
meson.build
16
meson.build
@ -32,7 +32,7 @@ wayland_cursor = dependency('wayland-cursor')
|
||||
wayland_protos = dependency('wayland-protocols')
|
||||
wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
|
||||
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')
|
||||
sigcpp = dependency('sigc++-2.0')
|
||||
libnl = dependency('libnl-3.0', required: get_option('libnl'))
|
||||
@ -47,10 +47,6 @@ src_files = files(
|
||||
'src/modules/clock.cpp',
|
||||
'src/modules/custom.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/bar.cpp',
|
||||
'src/client.cpp'
|
||||
@ -75,6 +71,16 @@ if libpulse.found()
|
||||
src_files += 'src/modules/pulseaudio.cpp'
|
||||
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')
|
||||
|
||||
executable(
|
||||
|
@ -1,2 +1,3 @@
|
||||
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('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") {
|
||||
return new waybar::modules::Clock(config_[name]);
|
||||
}
|
||||
#ifdef DHAVE_DBUSMENU
|
||||
if (name == "tray") {
|
||||
return new waybar::modules::SNI::Tray(config_[name]);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_LIBNL
|
||||
if (name == "network") {
|
||||
return new waybar::modules::Network(config_[name]);
|
||||
|
Loading…
Reference in New Issue
Block a user