2018-08-09 12:05:48 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <json/json.h>
|
2023-01-17 02:30:06 +01:00
|
|
|
#if defined(HAVE_CHRONO_TIMEZONES) || defined(HAVE_LIBDATE)
|
2018-08-09 12:05:48 +02:00
|
|
|
#include "modules/clock.hpp"
|
2020-10-10 14:09:55 +02:00
|
|
|
#else
|
|
|
|
#include "modules/simpleclock.hpp"
|
|
|
|
#endif
|
2018-08-20 17:20:02 +02:00
|
|
|
#ifdef HAVE_SWAY
|
2022-04-06 08:37:19 +02:00
|
|
|
#include "modules/sway/language.hpp"
|
2018-10-30 13:39:30 +01:00
|
|
|
#include "modules/sway/mode.hpp"
|
2022-08-28 22:55:48 +02:00
|
|
|
#include "modules/sway/scratchpad.hpp"
|
2018-08-15 20:17:17 +02:00
|
|
|
#include "modules/sway/window.hpp"
|
2019-04-18 17:52:00 +02:00
|
|
|
#include "modules/sway/workspaces.hpp"
|
2018-08-20 17:20:02 +02:00
|
|
|
#endif
|
2020-05-30 12:07:38 +02:00
|
|
|
#ifdef HAVE_WLR
|
|
|
|
#include "modules/wlr/taskbar.hpp"
|
2020-08-05 22:10:08 +02:00
|
|
|
#include "modules/wlr/workspace_manager.hpp"
|
2020-05-30 12:07:38 +02:00
|
|
|
#endif
|
2020-06-06 15:41:37 +02:00
|
|
|
#ifdef HAVE_RIVER
|
2023-04-03 09:41:24 +02:00
|
|
|
#include "modules/river/layout.hpp"
|
2022-05-31 22:28:09 +02:00
|
|
|
#include "modules/river/mode.hpp"
|
2020-06-06 15:41:37 +02:00
|
|
|
#include "modules/river/tags.hpp"
|
2022-05-19 21:20:04 +02:00
|
|
|
#include "modules/river/window.hpp"
|
2020-06-06 15:41:37 +02:00
|
|
|
#endif
|
2023-04-11 03:50:21 +02:00
|
|
|
#ifdef HAVE_DWL
|
|
|
|
#include "modules/dwl/tags.hpp"
|
|
|
|
#endif
|
2022-07-01 12:46:28 +02:00
|
|
|
#ifdef HAVE_HYPRLAND
|
|
|
|
#include "modules/hyprland/backend.hpp"
|
2022-08-18 18:00:27 +02:00
|
|
|
#include "modules/hyprland/language.hpp"
|
2022-12-21 01:45:57 +01:00
|
|
|
#include "modules/hyprland/submap.hpp"
|
2023-01-04 16:26:50 +01:00
|
|
|
#include "modules/hyprland/window.hpp"
|
2023-06-28 01:52:01 +02:00
|
|
|
#include "modules/hyprland/workspaces.hpp"
|
2022-07-01 12:46:28 +02:00
|
|
|
#endif
|
2022-09-30 21:59:27 +02:00
|
|
|
#if defined(__FreeBSD__) || (defined(__linux__) && !defined(NO_FILESYSTEM))
|
2018-08-09 12:05:48 +02:00
|
|
|
#include "modules/battery.hpp"
|
2019-05-12 19:53:14 +02:00
|
|
|
#endif
|
2019-08-11 15:10:37 +02:00
|
|
|
#if defined(HAVE_CPU_LINUX) || defined(HAVE_CPU_BSD)
|
2018-08-09 12:05:48 +02:00
|
|
|
#include "modules/cpu.hpp"
|
2019-08-11 15:10:37 +02:00
|
|
|
#endif
|
2019-04-18 17:52:00 +02:00
|
|
|
#include "modules/idle_inhibitor.hpp"
|
2019-08-09 12:40:33 +02:00
|
|
|
#if defined(HAVE_MEMORY_LINUX) || defined(HAVE_MEMORY_BSD)
|
2019-04-18 17:52:00 +02:00
|
|
|
#include "modules/memory.hpp"
|
2019-08-09 12:40:33 +02:00
|
|
|
#endif
|
2019-09-23 22:25:54 +02:00
|
|
|
#include "modules/disk.hpp"
|
2019-08-11 17:23:37 +02:00
|
|
|
#ifdef HAVE_DBUSMENU
|
2018-08-29 20:36:39 +02:00
|
|
|
#include "modules/sni/tray.hpp"
|
2018-10-25 19:12:28 +02:00
|
|
|
#endif
|
2021-11-01 19:17:29 +01:00
|
|
|
#ifdef HAVE_MPRIS
|
|
|
|
#include "modules/mpris/mpris.hpp"
|
|
|
|
#endif
|
2018-08-20 17:20:02 +02:00
|
|
|
#ifdef HAVE_LIBNL
|
2018-08-09 16:38:24 +02:00
|
|
|
#include "modules/network.hpp"
|
2018-08-20 17:20:02 +02:00
|
|
|
#endif
|
2019-02-19 05:11:18 +01:00
|
|
|
#ifdef HAVE_LIBUDEV
|
|
|
|
#include "modules/backlight.hpp"
|
|
|
|
#endif
|
2021-02-07 21:05:11 +01:00
|
|
|
#ifdef HAVE_LIBEVDEV
|
|
|
|
#include "modules/keyboard_state.hpp"
|
|
|
|
#endif
|
2022-05-13 21:30:45 +02:00
|
|
|
#ifdef HAVE_GAMEMODE
|
|
|
|
#include "modules/gamemode.hpp"
|
|
|
|
#endif
|
2022-03-15 17:54:06 +01:00
|
|
|
#ifdef HAVE_UPOWER
|
2022-03-19 11:34:34 +01:00
|
|
|
#include "modules/upower/upower.hpp"
|
2022-03-15 17:54:06 +01:00
|
|
|
#endif
|
2018-08-20 17:20:02 +02:00
|
|
|
#ifdef HAVE_LIBPULSE
|
2018-08-09 23:55:38 +02:00
|
|
|
#include "modules/pulseaudio.hpp"
|
2018-08-20 17:20:02 +02:00
|
|
|
#endif
|
2019-04-16 16:34:37 +02:00
|
|
|
#ifdef HAVE_LIBMPDCLIENT
|
2020-10-04 07:01:51 +02:00
|
|
|
#include "modules/mpd/mpd.hpp"
|
2019-04-16 16:34:37 +02:00
|
|
|
#endif
|
2020-09-06 19:44:13 +02:00
|
|
|
#ifdef HAVE_LIBSNDIO
|
|
|
|
#include "modules/sndio.hpp"
|
2019-04-16 16:34:37 +02:00
|
|
|
#endif
|
2021-12-03 23:32:53 +01:00
|
|
|
#ifdef HAVE_GIO_UNIX
|
2022-05-02 18:11:21 +02:00
|
|
|
#include "modules/bluetooth.hpp"
|
2022-05-06 17:01:43 +02:00
|
|
|
#include "modules/inhibitor.hpp"
|
2021-12-03 23:32:53 +01:00
|
|
|
#endif
|
2022-02-09 08:53:52 +01:00
|
|
|
#ifdef HAVE_LIBJACK
|
|
|
|
#include "modules/jack.hpp"
|
|
|
|
#endif
|
2022-11-16 21:23:12 +01:00
|
|
|
#ifdef HAVE_LIBWIREPLUMBER
|
|
|
|
#include "modules/wireplumber.hpp"
|
|
|
|
#endif
|
2023-04-15 01:36:15 +02:00
|
|
|
#ifdef HAVE_LIBCAVA
|
|
|
|
#include "modules/cava.hpp"
|
|
|
|
#endif
|
2019-04-18 17:43:16 +02:00
|
|
|
#include "bar.hpp"
|
2019-04-18 17:52:00 +02:00
|
|
|
#include "modules/custom.hpp"
|
2022-01-17 00:55:13 +01:00
|
|
|
#include "modules/image.hpp"
|
2019-04-18 17:52:00 +02:00
|
|
|
#include "modules/temperature.hpp"
|
2022-10-18 09:01:45 +02:00
|
|
|
#include "modules/user.hpp"
|
2018-08-09 12:05:48 +02:00
|
|
|
|
|
|
|
namespace waybar {
|
|
|
|
|
2018-08-16 14:29:41 +02:00
|
|
|
class Factory {
|
2019-04-18 17:52:00 +02:00
|
|
|
public:
|
|
|
|
Factory(const Bar& bar, const Json::Value& config);
|
2019-06-15 14:57:52 +02:00
|
|
|
AModule* makeModule(const std::string& name) const;
|
2019-04-18 17:52:00 +02:00
|
|
|
|
|
|
|
private:
|
2022-04-06 08:37:19 +02:00
|
|
|
const Bar& bar_;
|
2019-04-18 17:52:00 +02:00
|
|
|
const Json::Value& config_;
|
2018-08-16 14:29:41 +02:00
|
|
|
};
|
2018-08-09 12:05:48 +02:00
|
|
|
|
2019-04-18 17:52:00 +02:00
|
|
|
} // namespace waybar
|