2018-08-09 10:05:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <json/json.h>
|
2020-10-10 12:09:55 +00:00
|
|
|
#ifdef HAVE_LIBDATE
|
2018-08-09 10:05:48 +00:00
|
|
|
#include "modules/clock.hpp"
|
2020-10-10 12:09:55 +00:00
|
|
|
#else
|
|
|
|
#include "modules/simpleclock.hpp"
|
|
|
|
#endif
|
2018-08-20 15:20:02 +00:00
|
|
|
#ifdef HAVE_SWAY
|
2022-04-06 06:37:19 +00:00
|
|
|
#include "modules/sway/language.hpp"
|
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"
|
2018-08-20 15:20:02 +00:00
|
|
|
#endif
|
2020-05-30 10:07:38 +00:00
|
|
|
#ifdef HAVE_WLR
|
|
|
|
#include "modules/wlr/taskbar.hpp"
|
2020-08-05 20:10:08 +00:00
|
|
|
#include "modules/wlr/workspace_manager.hpp"
|
2020-05-30 10:07:38 +00:00
|
|
|
#endif
|
2020-06-06 13:41:37 +00:00
|
|
|
#ifdef HAVE_RIVER
|
2022-05-31 20:28:09 +00:00
|
|
|
#include "modules/river/mode.hpp"
|
2020-06-06 13:41:37 +00:00
|
|
|
#include "modules/river/tags.hpp"
|
2022-05-19 19:20:04 +00:00
|
|
|
#include "modules/river/window.hpp"
|
2020-06-06 13:41:37 +00:00
|
|
|
#endif
|
2019-08-09 09:52:16 +00:00
|
|
|
#if defined(__linux__) && !defined(NO_FILESYSTEM)
|
2018-08-09 10:05:48 +00:00
|
|
|
#include "modules/battery.hpp"
|
2019-05-12 17:53:14 +00:00
|
|
|
#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
|
2018-08-29 18:36:39 +00:00
|
|
|
#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
|
2019-02-19 04:11:18 +00:00
|
|
|
#ifdef HAVE_LIBUDEV
|
|
|
|
#include "modules/backlight.hpp"
|
|
|
|
#endif
|
2021-02-07 20:05:11 +00:00
|
|
|
#ifdef HAVE_LIBEVDEV
|
|
|
|
#include "modules/keyboard_state.hpp"
|
|
|
|
#endif
|
2022-05-13 19:30:45 +00:00
|
|
|
#ifdef HAVE_GAMEMODE
|
|
|
|
#include "modules/gamemode.hpp"
|
|
|
|
#endif
|
2022-03-15 16:54:06 +00:00
|
|
|
#ifdef HAVE_UPOWER
|
2022-03-19 10:34:34 +00:00
|
|
|
#include "modules/upower/upower.hpp"
|
2022-03-15 16:54:06 +00:00
|
|
|
#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
|
2020-10-04 05:01:51 +00:00
|
|
|
#include "modules/mpd/mpd.hpp"
|
2019-04-16 14:34:37 +00:00
|
|
|
#endif
|
2020-09-06 17:44:13 +00:00
|
|
|
#ifdef HAVE_LIBSNDIO
|
|
|
|
#include "modules/sndio.hpp"
|
2019-04-16 14:34:37 +00:00
|
|
|
#endif
|
2021-12-03 22:32:53 +00:00
|
|
|
#ifdef HAVE_GIO_UNIX
|
2022-05-02 16:11:21 +00:00
|
|
|
#include "modules/bluetooth.hpp"
|
2022-05-06 15:01:43 +00:00
|
|
|
#include "modules/inhibitor.hpp"
|
2021-12-03 22:32:53 +00:00
|
|
|
#endif
|
2019-04-18 15:43:16 +00:00
|
|
|
#include "bar.hpp"
|
2019-04-18 15:52:00 +00:00
|
|
|
#include "modules/custom.hpp"
|
|
|
|
#include "modules/temperature.hpp"
|
2018-08-09 10:05:48 +00:00
|
|
|
|
2022-07-19 05:39:19 +00:00
|
|
|
#ifdef HAVE_LIBJACK
|
|
|
|
#include "modules/jack.hpp"
|
2019-08-09 09:52:16 +00:00
|
|
|
#endif
|
2022-02-09 07:53:52 +00:00
|
|
|
#ifdef HAVE_LIBJACK
|
|
|
|
#include "modules/jack.hpp"
|
|
|
|
#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:
|
2022-04-06 06:37:19 +00:00
|
|
|
const Bar& bar_;
|
2019-04-18 15:52:00 +00:00
|
|
|
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
|