refactor and shizz
This commit is contained in:
@@ -6,22 +6,23 @@
|
||||
#include <sigc++/connection.h>
|
||||
|
||||
#include "services/hyprland.hpp"
|
||||
#include "gtkmm/overlay.h"
|
||||
|
||||
class WorkspaceIndicator : public Gtk::Box {
|
||||
public:
|
||||
WorkspaceIndicator(HyprlandService &service, int monitorId);
|
||||
WorkspaceIndicator(int monitorId);
|
||||
~WorkspaceIndicator() override;
|
||||
|
||||
private:
|
||||
HyprlandService &service;
|
||||
HyprlandService *service = HyprlandService::getInstance();
|
||||
int monitorId;
|
||||
sigc::connection workspaceConnection;
|
||||
sigc::connection monitorConnection;
|
||||
std::map<int, Gtk::Label *> workspaceLabels;
|
||||
std::map<int, Gtk::Overlay *> workspaceIndicators;
|
||||
std::map<int, Glib::RefPtr<Gtk::GestureClick>> workspaceGestures;
|
||||
|
||||
void rebuild();
|
||||
void on_workspace_update();
|
||||
void on_monitor_update();
|
||||
void refreshLabel(Gtk::Label *label, const HyprlandService::WorkspaceState &state);
|
||||
void refreshLabel(Gtk::Overlay *overlay, const HyprlandService::WorkspaceState &state);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user