From 2c4369a65321901fb70b5d9327736a9aaa6e9bd0 Mon Sep 17 00:00:00 2001 From: Marc <39213657+marcplustwo@users.noreply.github.com> Date: Tue, 21 Jan 2020 15:46:08 +0100 Subject: [PATCH] add basis for bluetooth module implementation --- include/factory.hpp | 1 + meson.build | 1 + src/factory.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/include/factory.hpp b/include/factory.hpp index 7d4d14e3..b14b9988 100644 --- a/include/factory.hpp +++ b/include/factory.hpp @@ -32,6 +32,7 @@ #include "bar.hpp" #include "modules/custom.hpp" #include "modules/temperature.hpp" +#include "modules/bluetooth.hpp" namespace waybar { diff --git a/meson.build b/meson.build index a099ad2b..0032c915 100644 --- a/meson.build +++ b/meson.build @@ -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', diff --git a/src/factory.cpp b/src/factory.cpp index 8f7cea75..16a6903a 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -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]); }