add basis for bluetooth module implementation

This commit is contained in:
Marc 2020-01-21 15:46:08 +01:00
parent 2dc4ae78fc
commit 2c4369a653
3 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include "bar.hpp"
#include "modules/custom.hpp"
#include "modules/temperature.hpp"
#include "modules/bluetooth.hpp"
namespace waybar {

View File

@ -88,6 +88,7 @@ src_files = files(
'src/ALabel.cpp',
'src/modules/memory.cpp',
'src/modules/battery.cpp',
'src/modules/bluetooth.cpp',
'src/modules/clock.cpp',
'src/modules/custom.cpp',
'src/modules/cpu.cpp',

View File

@ -66,6 +66,9 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
if (ref == "temperature") {
return new waybar::modules::Temperature(id, config_[name]);
}
if (ref == "bluetooth") {
return new waybar::modules::Bluetooth(id, config_[name]);
}
if (ref.compare(0, 7, "custom/") == 0 && ref.size() > 7) {
return new waybar::modules::Custom(ref.substr(7), id, config_[name]);
}