temp: changed window -> windowcount
This commit is contained in:
65
include/modules/hyprland/windowcount.hpp
Normal file
65
include/modules/hyprland/windowcount.hpp
Normal file
@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "AAppIconLabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/hyprland/backend.hpp"
|
||||
#include "util/json.hpp"
|
||||
|
||||
namespace waybar::modules::hyprland {
|
||||
|
||||
class WindowCount : public waybar::AAppIconLabel, public EventHandler {
|
||||
public:
|
||||
WindowCount(const std::string&, const waybar::Bar&, const Json::Value&);
|
||||
~WindowCount() override;
|
||||
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
struct Workspace {
|
||||
int id;
|
||||
int windows;
|
||||
std::string last_window;
|
||||
std::string last_window_title;
|
||||
|
||||
static auto parse(const Json::Value& value) -> Workspace;
|
||||
};
|
||||
|
||||
struct WindowCountData {
|
||||
bool floating;
|
||||
int monitor = -1;
|
||||
std::string class_name;
|
||||
std::string initial_class_name;
|
||||
std::string title;
|
||||
std::string initial_title;
|
||||
bool fullscreen;
|
||||
bool grouped;
|
||||
|
||||
static auto parse(const Json::Value&) -> WindowCountData;
|
||||
};
|
||||
|
||||
static auto getActiveWorkspace(const std::string&) -> Workspace;
|
||||
static auto getActiveWorkspace() -> Workspace;
|
||||
void onEvent(const std::string& ev) override;
|
||||
void queryActiveWorkspace();
|
||||
void setClass(const std::string&, bool enable);
|
||||
|
||||
bool separateOutputs_;
|
||||
std::mutex mutex_;
|
||||
const Bar& bar_;
|
||||
util::JsonParser parser_;
|
||||
WindowCountData windowData_;
|
||||
Workspace workspace_;
|
||||
std::string soloClass_;
|
||||
std::string lastSoloClass_;
|
||||
bool solo_;
|
||||
bool allFloating_;
|
||||
bool swallowing_;
|
||||
bool fullscreen_;
|
||||
bool focused_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
Reference in New Issue
Block a user