deine cousine

This commit is contained in:
2025-12-18 11:04:30 +01:00
parent 9b0a036925
commit c245fa7277
6 changed files with 120 additions and 63 deletions

View File

@@ -59,6 +59,8 @@ class HyprlandService {
int fd = -1;
std::map<int, Monitor> monitors;
std::map<int, WorkspaceState *> workspaces;
// persistent buffer for socket reads to handle partial messages
std::string socket_buffer;
std::string get_socket_path();
bool on_socket_read(Glib::IOCondition condition);

View File

@@ -2,6 +2,7 @@
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/gestureclick.h>
#include <sigc++/connection.h>
#include "services/hyprland.hpp"
@@ -17,9 +18,10 @@ class WorkspaceIndicator : public Gtk::Box {
sigc::connection workspaceConnection;
sigc::connection monitorConnection;
std::map<int, Gtk::Label *> workspaceLabels;
std::map<int, Glib::RefPtr<Gtk::GestureClick>> workspaceGestures;
void rebuild();
void on_workspace_update();
void on_monitor_update();
void refreshLabel(Gtk::Label *label, HyprlandService::WorkspaceState state);
void refreshLabel(Gtk::Label *label, const HyprlandService::WorkspaceState &state);
};