Waybar/include/factory.hpp

68 lines
1.4 KiB
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/window.hpp"
2019-04-18 15:52:00 +00:00
#include "modules/sway/workspaces.hpp"
#include "modules/sway/language.hpp"
2018-08-20 15:20:02 +00:00
#endif
#ifdef HAVE_WLR
#include "modules/wlr/taskbar.hpp"
#endif
2020-06-06 13:41:37 +00:00
#ifdef HAVE_RIVER
#include "modules/river/tags.hpp"
#endif
#if defined(__linux__) && !defined(NO_FILESYSTEM)
2018-08-09 10:05:48 +00:00
#include "modules/battery.hpp"
#endif
2019-08-11 13:10:37 +00:00
#if defined(HAVE_CPU_LINUX) || defined(HAVE_CPU_BSD)
2018-08-09 10:05:48 +00:00
#include "modules/cpu.hpp"
2019-08-11 13:10:37 +00:00
#endif
2019-04-18 15:52:00 +00:00
#include "modules/idle_inhibitor.hpp"
2019-08-09 10:40:33 +00:00
#if defined(HAVE_MEMORY_LINUX) || defined(HAVE_MEMORY_BSD)
2019-04-18 15:52:00 +00:00
#include "modules/memory.hpp"
2019-08-09 10:40:33 +00:00
#endif
2019-09-23 20:25:54 +00:00
#include "modules/disk.hpp"
2019-08-11 15:23:37 +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_LIBUDEV
#include "modules/backlight.hpp"
#endif
2018-08-20 15:20:02 +00:00
#ifdef HAVE_LIBPULSE
2018-08-09 21:55:38 +00:00
#include "modules/pulseaudio.hpp"
2018-08-20 15:20:02 +00:00
#endif
2019-04-16 14:34:37 +00:00
#ifdef HAVE_LIBMPDCLIENT
#include "modules/mpd/mpd.hpp"
2019-04-16 14:34:37 +00:00
#endif
#ifdef HAVE_LIBSNDIO
#include "modules/sndio.hpp"
#endif
#include "bar.hpp"
2019-04-18 15:52:00 +00:00
#include "modules/custom.hpp"
#include "modules/temperature.hpp"
#if defined(__linux__)
# ifdef WANT_RFKILL
# include "modules/bluetooth.hpp"
# endif
#endif
2018-08-09 10:05:48 +00:00
namespace waybar {
2018-08-16 12:29:41 +00:00
class Factory {
2019-04-18 15:52:00 +00:00
public:
Factory(const Bar& bar, const Json::Value& config);
2019-06-15 12:57:52 +00:00
AModule* makeModule(const std::string& name) const;
2019-04-18 15:52:00 +00:00
private:
const Bar& bar_;
const Json::Value& config_;
2018-08-16 12:29:41 +00:00
};
2018-08-09 10:05:48 +00:00
2019-04-18 15:52:00 +00:00
} // namespace waybar