Implement hyprland submap module

This commit is contained in:
Enes Hecan
2022-12-21 01:45:57 +01:00
parent 6e296838e4
commit 4d59de42af
6 changed files with 172 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "modules/hyprland/backend.hpp"
#include "modules/hyprland/language.hpp"
#include "modules/hyprland/window.hpp"
#include "modules/hyprland/submap.hpp"
#endif
#if defined(__FreeBSD__) || (defined(__linux__) && !defined(NO_FILESYSTEM))
#include "modules/battery.hpp"

View File

@ -0,0 +1,25 @@
#include <fmt/format.h>
#include "ALabel.hpp"
#include "bar.hpp"
#include "modules/hyprland/backend.hpp"
#include "util/json.hpp"
namespace waybar::modules::hyprland {
class Submap : public waybar::ALabel, public EventHandler {
public:
Submap(const std::string&, const waybar::Bar&, const Json::Value&);
~Submap();
auto update() -> void;
private:
void onEvent(const std::string&);
std::mutex mutex_;
const Bar& bar_;
util::JsonParser parser_;
std::string submap_;
};
} // namespace waybar::modules::hyprland