mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
Add dwl/window module
This commit is contained in:
37
include/modules/dwl/window.hpp
Normal file
37
include/modules/dwl/window.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "AAppIconLabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "util/json.hpp"
|
||||
#include "dwl-ipc-unstable-v2-client-protocol.h"
|
||||
|
||||
namespace waybar::modules::dwl {
|
||||
|
||||
class Window : public AAppIconLabel, public sigc::trackable {
|
||||
public:
|
||||
Window(const std::string&, const waybar::Bar&, const Json::Value&);
|
||||
virtual ~Window() = default;
|
||||
|
||||
void handle_layout(const uint32_t layout);
|
||||
void handle_title(const char *title);
|
||||
void handle_appid(const char *ppid);
|
||||
void handle_layout_symbol(const char *layout_symbol);
|
||||
void handle_frame();
|
||||
|
||||
struct zdwl_ipc_manager_v2 *status_manager_;
|
||||
private:
|
||||
const Bar& bar_;
|
||||
|
||||
std::string title_;
|
||||
std::string appid_;
|
||||
std::string layout_symbol_;
|
||||
uint32_t layout_;
|
||||
|
||||
struct zdwl_ipc_output_v2 *output_status_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::dwl
|
Reference in New Issue
Block a user