Waybar/include/factory.hpp

38 lines
722 B
C++
Raw Normal View History

2018-08-09 10:05:48 +00:00
#pragma once
#include <json/json.h>
#include "modules/clock.hpp"
2018-08-20 15:20:02 +00:00
#ifdef HAVE_SWAY
2018-10-30 12:39:30 +00:00
#include "modules/sway/mode.hpp"
2018-08-15 18:17:17 +00:00
#include "modules/sway/workspaces.hpp"
#include "modules/sway/window.hpp"
2018-08-20 15:20:02 +00:00
#endif
2018-08-09 10:05:48 +00:00
#include "modules/battery.hpp"
#include "modules/memory.hpp"
#include "modules/cpu.hpp"
2018-10-25 17:12:28 +00:00
#ifdef HAVE_DBUSMENU
#include "modules/sni/tray.hpp"
2018-10-25 17:12:28 +00:00
#endif
2018-08-20 15:20:02 +00:00
#ifdef HAVE_LIBNL
2018-08-09 14:38:24 +00:00
#include "modules/network.hpp"
2018-08-20 15:20:02 +00:00
#endif
#ifdef HAVE_LIBPULSE
2018-08-09 21:55:38 +00:00
#include "modules/pulseaudio.hpp"
2018-08-20 15:20:02 +00:00
#endif
#include "modules/custom.hpp"
2018-08-09 10:05:48 +00:00
namespace waybar {
2018-09-10 09:25:53 +00:00
class Bar;
2018-08-16 12:29:41 +00:00
class Factory {
public:
2018-08-20 12:50:45 +00:00
Factory(Bar& bar, const Json::Value& config);
IModule* makeModule(const std::string &name) const;
2018-08-16 12:29:41 +00:00
private:
2018-08-20 12:50:45 +00:00
Bar& bar_;
const Json::Value& config_;
2018-08-16 12:29:41 +00:00
};
2018-08-09 10:05:48 +00:00
}