refactor and shizz

This commit is contained in:
2025-12-25 21:13:00 +01:00
parent a06c96f648
commit 9b5db719cb
27 changed files with 286 additions and 312 deletions

View File

@@ -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);
};