fix code style
This commit is contained in:
@@ -9,15 +9,16 @@
|
||||
#include "services/tray.hpp"
|
||||
|
||||
class App {
|
||||
public:
|
||||
public:
|
||||
App();
|
||||
|
||||
int run();
|
||||
private:
|
||||
|
||||
private:
|
||||
Glib::RefPtr<Gtk::Application> app;
|
||||
std::vector<Bar*> bars;
|
||||
std::vector<Bar *> bars;
|
||||
HyprlandService hyprlandService;
|
||||
TrayService trayService;
|
||||
|
||||
void setupServices();
|
||||
|
||||
void setupServices();
|
||||
};
|
||||
@@ -6,28 +6,28 @@
|
||||
#include "services/hyprland.hpp"
|
||||
#include "services/tray.hpp"
|
||||
#include "widgets/clock.hpp"
|
||||
#include "widgets/workspaceIndicator.hpp"
|
||||
#include "widgets/tray.hpp"
|
||||
#include "widgets/workspaceIndicator.hpp"
|
||||
|
||||
class Bar : public Gtk::Window
|
||||
{
|
||||
class Bar : public Gtk::Window {
|
||||
public:
|
||||
Bar(GdkMonitor *monitor, HyprlandService &hyprlandService, TrayService &trayService, int monitorId);
|
||||
Bar(GdkMonitor *monitor, HyprlandService &hyprlandService,
|
||||
TrayService &trayService, int monitorId);
|
||||
|
||||
protected:
|
||||
Clock clock;
|
||||
Gtk::CenterBox main_box{};
|
||||
Gtk::Box left_box{Gtk::Orientation::HORIZONTAL};
|
||||
Gtk::Box center_box{Gtk::Orientation::HORIZONTAL};
|
||||
Gtk::Box right_box{Gtk::Orientation::HORIZONTAL};
|
||||
|
||||
private:
|
||||
HyprlandService &m_hyprlandService;
|
||||
TrayService &m_trayService;
|
||||
int m_monitorId;
|
||||
WorkspaceIndicator *m_workspaceIndicator = nullptr;
|
||||
TrayWidget *m_trayWidget = nullptr;
|
||||
class VolumeWidget *m_volumeWidget = nullptr;
|
||||
Clock clock;
|
||||
TrayService &trayService;
|
||||
HyprlandService &hyprlandService;
|
||||
int monitorId;
|
||||
WorkspaceIndicator *workspaceIndicator = nullptr;
|
||||
TrayWidget *trayWidget = nullptr;
|
||||
class VolumeWidget *volumeWidget = nullptr;
|
||||
|
||||
void setup_ui();
|
||||
void load_css();
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
class SystemHelper
|
||||
{
|
||||
class SystemHelper {
|
||||
public:
|
||||
static std::string get_command_output(const char *cmd)
|
||||
{
|
||||
static std::string get_command_output(const char *cmd) {
|
||||
std::array<char, 128> buffer;
|
||||
std::string result;
|
||||
std::unique_ptr<FILE, int (*)(FILE *)> pipe(popen(cmd, "r"), pclose);
|
||||
|
||||
if (!pipe)
|
||||
{
|
||||
if (!pipe) {
|
||||
throw std::runtime_error("popen() failed!");
|
||||
}
|
||||
|
||||
// Read the output a chunk at a time until the stream ends
|
||||
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr)
|
||||
{
|
||||
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
|
||||
result += buffer.data();
|
||||
}
|
||||
|
||||
@@ -30,11 +26,9 @@ class SystemHelper
|
||||
}
|
||||
|
||||
// Read an entire file into a string. Throws std::runtime_error on failure.
|
||||
static std::string read_file_to_string(const std::string &path)
|
||||
{
|
||||
static std::string read_file_to_string(const std::string &path) {
|
||||
std::ifstream in(path, std::ios::in | std::ios::binary);
|
||||
if (!in)
|
||||
{
|
||||
if (!in) {
|
||||
throw std::runtime_error("Failed to open file: " + path);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,11 @@
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <string>
|
||||
|
||||
class HyprlandService
|
||||
{
|
||||
class HyprlandService {
|
||||
public:
|
||||
static constexpr int kWorkspaceSlotCount = 5;
|
||||
static constexpr int kWorkspaceSlotCount = 5;
|
||||
|
||||
struct WorkspaceState
|
||||
{
|
||||
struct WorkspaceState {
|
||||
int id = -1;
|
||||
int hyprId = -1;
|
||||
bool active = false;
|
||||
@@ -22,8 +20,7 @@ class HyprlandService
|
||||
std::string label;
|
||||
};
|
||||
|
||||
struct Monitor
|
||||
{
|
||||
struct Monitor {
|
||||
std::map<int, WorkspaceState> workspaceStates;
|
||||
std::string name;
|
||||
int x = 0;
|
||||
@@ -52,12 +49,12 @@ class HyprlandService
|
||||
// associated Hyprland workspace id (hyprId >= 0) that id will be used.
|
||||
// Otherwise the slot and monitor name will be used to request creation
|
||||
// / activation via `hyprctl`.
|
||||
void switchToWorkspace(int monitorId, int slot);
|
||||
void switchToWorkspace(int workspaceId);
|
||||
|
||||
private:
|
||||
int m_fd = -1;
|
||||
std::string m_buffer;
|
||||
std::map<int, Monitor> m_monitors;
|
||||
int fd = -1;
|
||||
std::string buffer;
|
||||
std::map<int, Monitor> monitors;
|
||||
|
||||
bool on_socket_read(Glib::IOCondition condition);
|
||||
void parse_message(const std::string &line);
|
||||
@@ -66,8 +63,7 @@ class HyprlandService
|
||||
void refresh_workspaces();
|
||||
};
|
||||
|
||||
inline void HyprlandService::printMonitor(const Monitor &mon) const
|
||||
{
|
||||
inline void HyprlandService::printMonitor(const Monitor &mon) const {
|
||||
std::cout << "=== Monitor Info ===\n";
|
||||
std::cout << "Name: " << mon.name << " (ID: " << mon.id << ")\n";
|
||||
std::cout << "Position: (" << mon.x << ", " << mon.y << ")\n";
|
||||
@@ -75,26 +71,26 @@ inline void HyprlandService::printMonitor(const Monitor &mon) const
|
||||
|
||||
std::cout << "Workspaces:\n";
|
||||
|
||||
if (mon.workspaceStates.empty())
|
||||
{
|
||||
if (mon.workspaceStates.empty()) {
|
||||
std::cout << " (None)\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int slot = 1; slot <= HyprlandService::kWorkspaceSlotCount; ++slot)
|
||||
{
|
||||
} else {
|
||||
for (int slot = 1; slot <= HyprlandService::kWorkspaceSlotCount;
|
||||
++slot) {
|
||||
const auto it = mon.workspaceStates.find(slot);
|
||||
if (it == mon.workspaceStates.end())
|
||||
{
|
||||
if (it == mon.workspaceStates.end()) {
|
||||
std::cout << " - [Slot: " << slot << " | HyprID: n/a]"
|
||||
<< " Label: <none> | Active: No | Focused: No | Urgent: No\n";
|
||||
<< " Label: <none> | Active: No | Focused: No | "
|
||||
"Urgent: No\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
const WorkspaceState &ws = it->second;
|
||||
std::cout << " - [Slot: " << ws.id << " | HyprID: "
|
||||
<< (ws.hyprId >= 0 ? std::to_string(ws.hyprId) : std::string("n/a")) << "] "
|
||||
<< "Label: " << (ws.label.empty() ? "<none>" : ws.label) << " | "
|
||||
<< (ws.hyprId >= 0 ? std::to_string(ws.hyprId)
|
||||
: std::string("n/a"))
|
||||
<< "] "
|
||||
<< "Label: " << (ws.label.empty() ? "<none>" : ws.label)
|
||||
<< " | "
|
||||
<< "Active: " << (ws.active ? "Yes" : "No") << " | "
|
||||
<< "Focused: " << (ws.focused ? "Yes" : "No") << " | "
|
||||
<< "Urgent: " << (ws.urgent ? "Yes" : "No") << "\n";
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <gdkmm/memorytexture.h>
|
||||
#include <giomm/actiongroup.h>
|
||||
#include <giomm/dbusconnection.h>
|
||||
#include <giomm/menumodel.h>
|
||||
#include <giomm/init.h>
|
||||
#include <giomm/menumodel.h>
|
||||
#include <glibmm/bytes.h>
|
||||
#include <glibmm/refptr.h>
|
||||
#include <sigc++/sigc++.h>
|
||||
@@ -16,11 +16,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class TrayService
|
||||
{
|
||||
class TrayService {
|
||||
public:
|
||||
struct Item
|
||||
{
|
||||
struct Item {
|
||||
std::string id;
|
||||
std::string busName;
|
||||
std::string objectPath;
|
||||
@@ -48,14 +46,13 @@ class TrayService
|
||||
Glib::RefPtr<Gio::MenuModel> get_menu_model(const std::string &id);
|
||||
Glib::RefPtr<Gio::ActionGroup> get_menu_action_group(const std::string &id);
|
||||
void debug_dump_menu_layout(const std::string &id);
|
||||
struct MenuNode
|
||||
{
|
||||
int id = 0;
|
||||
std::string label;
|
||||
bool enabled = true;
|
||||
bool visible = true;
|
||||
bool separator = false;
|
||||
std::vector<MenuNode> children;
|
||||
struct MenuNode {
|
||||
int id = 0;
|
||||
std::string label;
|
||||
bool enabled = true;
|
||||
bool visible = true;
|
||||
bool separator = false;
|
||||
std::vector<MenuNode> children;
|
||||
};
|
||||
std::optional<MenuNode> get_menu_layout(const std::string &id);
|
||||
bool activate_menu_item(const std::string &id, int itemId);
|
||||
@@ -65,56 +62,57 @@ class TrayService
|
||||
sigc::signal<void(const Item &)> &signal_item_updated();
|
||||
|
||||
private:
|
||||
struct TrackedItem
|
||||
{
|
||||
struct TrackedItem {
|
||||
Item publicData;
|
||||
guint signalSubscriptionId = 0;
|
||||
guint ownerWatchId = 0;
|
||||
Glib::RefPtr<Gio::MenuModel> menuModel;
|
||||
Glib::RefPtr<Gio::ActionGroup> menuActions;
|
||||
Glib::RefPtr<Gio::MenuModel> menuModel;
|
||||
Glib::RefPtr<Gio::ActionGroup> menuActions;
|
||||
};
|
||||
|
||||
Glib::RefPtr<Gio::DBus::Connection> m_connection;
|
||||
Glib::RefPtr<Gio::DBus::NodeInfo> m_nodeInfo;
|
||||
Gio::DBus::InterfaceVTable m_vtable;
|
||||
Glib::RefPtr<Gio::DBus::Connection> connection;
|
||||
Glib::RefPtr<Gio::DBus::NodeInfo> nodeInfo;
|
||||
Gio::DBus::InterfaceVTable vtable;
|
||||
|
||||
guint m_nameOwnerId = 0;
|
||||
guint m_registrationId = 0;
|
||||
bool m_hostRegistered = false;
|
||||
guint nameOwnerId = 0;
|
||||
guint registrationId = 0;
|
||||
bool hostRegistered = false;
|
||||
|
||||
std::map<std::string, std::unique_ptr<TrackedItem>> m_items;
|
||||
std::map<std::string, std::unique_ptr<TrackedItem>> items;
|
||||
|
||||
sigc::signal<void(const Item &)> m_itemAddedSignal;
|
||||
sigc::signal<void(const std::string &)> m_itemRemovedSignal;
|
||||
sigc::signal<void(const Item &)> m_itemUpdatedSignal;
|
||||
sigc::signal<void(const Item &)> itemAddedSignal;
|
||||
sigc::signal<void(const std::string &)> itemRemovedSignal;
|
||||
sigc::signal<void(const Item &)> itemUpdatedSignal;
|
||||
|
||||
void on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection> &connection, const Glib::ustring &name);
|
||||
void on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection> &connection, const Glib::ustring &name);
|
||||
void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection> &connection, const Glib::ustring &name);
|
||||
void on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &name);
|
||||
void on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &name);
|
||||
void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &name);
|
||||
|
||||
void handle_method_call(const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender,
|
||||
const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name,
|
||||
const Glib::ustring &method_name,
|
||||
const Glib::VariantContainerBase ¶meters,
|
||||
const Glib::RefPtr<Gio::DBus::MethodInvocation> &invocation);
|
||||
void handle_method_call(
|
||||
const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender, const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name, const Glib::ustring &method_name,
|
||||
const Glib::VariantContainerBase ¶meters,
|
||||
const Glib::RefPtr<Gio::DBus::MethodInvocation> &invocation);
|
||||
|
||||
void handle_get_property_slot(Glib::VariantBase &result,
|
||||
const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender,
|
||||
const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name,
|
||||
const Glib::ustring &property_name);
|
||||
bool handle_set_property_slot(const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender,
|
||||
const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name,
|
||||
const Glib::ustring &property_name,
|
||||
const Glib::VariantBase &value);
|
||||
void handle_get_property_slot(
|
||||
Glib::VariantBase &result,
|
||||
const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender, const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name,
|
||||
const Glib::ustring &property_name);
|
||||
bool handle_set_property_slot(
|
||||
const Glib::RefPtr<Gio::DBus::Connection> &connection,
|
||||
const Glib::ustring &sender, const Glib::ustring &object_path,
|
||||
const Glib::ustring &interface_name, const Glib::ustring &property_name,
|
||||
const Glib::VariantBase &value);
|
||||
|
||||
Glib::VariantBase handle_get_property(const Glib::ustring &property_name);
|
||||
bool handle_set_property(const Glib::ustring &property_name, const Glib::VariantBase &value);
|
||||
bool handle_set_property(const Glib::ustring &property_name,
|
||||
const Glib::VariantBase &value);
|
||||
|
||||
void register_item(const Glib::ustring &sender, const std::string &service);
|
||||
void unregister_item(const std::string &id);
|
||||
@@ -122,25 +120,23 @@ class TrayService
|
||||
void refresh_item(TrackedItem &item);
|
||||
void emit_registered_items_changed();
|
||||
|
||||
Glib::Variant<std::vector<Glib::ustring>> create_registered_items_variant() const;
|
||||
Glib::Variant<std::vector<Glib::ustring>>
|
||||
create_registered_items_variant() const;
|
||||
|
||||
void emit_watcher_signal(const Glib::ustring &signal_name, const Glib::VariantContainerBase ¶meters);
|
||||
void emit_watcher_signal(const Glib::ustring &signal_name,
|
||||
const Glib::VariantContainerBase ¶meters);
|
||||
|
||||
static void on_dbus_signal_static(GDBusConnection *connection,
|
||||
const gchar *sender_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters,
|
||||
gpointer user_data);
|
||||
void on_dbus_signal(const gchar *sender_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters);
|
||||
const gchar *sender_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters, gpointer user_data);
|
||||
void on_dbus_signal(const gchar *sender_name, const gchar *object_path,
|
||||
const gchar *interface_name, const gchar *signal_name,
|
||||
GVariant *parameters);
|
||||
static void on_name_vanished_static(GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data);
|
||||
const gchar *name, gpointer user_data);
|
||||
void on_name_vanished(const gchar *bus_name);
|
||||
|
||||
static Glib::RefPtr<Gdk::Paintable> parse_icon_pixmap(GVariant *variant);
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "interface/updateable.ipp"
|
||||
|
||||
class Clock : public Gtk::Label, public IUpdatable
|
||||
{
|
||||
class Clock : public Gtk::Label, public IUpdatable {
|
||||
public:
|
||||
bool onUpdate();
|
||||
};
|
||||
|
||||
@@ -4,12 +4,9 @@
|
||||
#include <gtkmm.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
|
||||
class Spacer : public Gtk::Label
|
||||
{
|
||||
class Spacer : public Gtk::Label {
|
||||
public:
|
||||
Spacer()
|
||||
{
|
||||
Spacer() {
|
||||
set_hexpand(true);
|
||||
set_text("|");
|
||||
set_name("spacer");
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <giomm/menu.h>
|
||||
#include <giomm/menuitem.h>
|
||||
#include <giomm/menumodel.h>
|
||||
#include <giomm/simpleaction.h>
|
||||
#include <giomm/simpleactiongroup.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/gestureclick.h>
|
||||
#include <gtkmm/picture.h>
|
||||
#include <gtkmm/image.h>
|
||||
#include <gtkmm/picture.h>
|
||||
#include <gtkmm/popovermenu.h>
|
||||
#include <giomm/menumodel.h>
|
||||
#include <giomm/menu.h>
|
||||
#include <giomm/menuitem.h>
|
||||
#include <giomm/simpleaction.h>
|
||||
#include <giomm/simpleactiongroup.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -18,53 +18,52 @@
|
||||
|
||||
#include "services/tray.hpp"
|
||||
|
||||
class TrayIconWidget : public Gtk::Button
|
||||
{
|
||||
class TrayIconWidget : public Gtk::Button {
|
||||
public:
|
||||
TrayIconWidget(TrayService &service, std::string id);
|
||||
|
||||
void update(const TrayService::Item &item);
|
||||
|
||||
private:
|
||||
TrayService &m_service;
|
||||
std::string m_id;
|
||||
Gtk::Box m_container;
|
||||
Gtk::Picture m_picture;
|
||||
Gtk::Image m_image;
|
||||
Glib::RefPtr<Gtk::GestureClick> m_primaryGesture;
|
||||
Glib::RefPtr<Gtk::GestureClick> m_secondaryGesture;
|
||||
Glib::RefPtr<Gtk::PopoverMenu> m_menuPopover;
|
||||
Glib::RefPtr<Gio::SimpleActionGroup> m_menuActions;
|
||||
Glib::RefPtr<Gio::MenuModel> m_menuModel;
|
||||
sigc::connection m_menuChangedConnection;
|
||||
bool m_menuPopupPending = false;
|
||||
double m_pendingX = 0.0;
|
||||
double m_pendingY = 0.0;
|
||||
TrayService &service;
|
||||
std::string id;
|
||||
Gtk::Box container;
|
||||
Gtk::Picture picture;
|
||||
Gtk::Image image;
|
||||
Glib::RefPtr<Gtk::GestureClick> primaryGesture;
|
||||
Glib::RefPtr<Gtk::GestureClick> secondaryGesture;
|
||||
Glib::RefPtr<Gtk::PopoverMenu> menuPopover;
|
||||
Glib::RefPtr<Gio::SimpleActionGroup> menuActions;
|
||||
Glib::RefPtr<Gio::MenuModel> menuModel;
|
||||
sigc::connection menuChangedConnection;
|
||||
bool menuPopupPending = false;
|
||||
double pendingX = 0.0;
|
||||
double pendingY = 0.0;
|
||||
|
||||
void on_primary_released(int n_press, double x, double y);
|
||||
void on_secondary_released(int n_press, double x, double y);
|
||||
bool ensure_menu();
|
||||
void on_menu_items_changed(guint position, guint removed, guint added);
|
||||
void try_popup();
|
||||
void populate_menu_items(const std::vector<TrayService::MenuNode> &nodes,
|
||||
const Glib::RefPtr<Gio::Menu> &menu,
|
||||
const Glib::RefPtr<Gio::SimpleActionGroup> &actions);
|
||||
void
|
||||
populate_menu_items(const std::vector<TrayService::MenuNode> &nodes,
|
||||
const Glib::RefPtr<Gio::Menu> &menu,
|
||||
const Glib::RefPtr<Gio::SimpleActionGroup> &actions);
|
||||
void on_menu_action(const Glib::VariantBase ¶meter, int itemId);
|
||||
};
|
||||
|
||||
class TrayWidget : public Gtk::Box
|
||||
{
|
||||
class TrayWidget : public Gtk::Box {
|
||||
public:
|
||||
explicit TrayWidget(TrayService &service);
|
||||
~TrayWidget() override;
|
||||
|
||||
private:
|
||||
TrayService &m_service;
|
||||
std::map<std::string, std::unique_ptr<TrayIconWidget>> m_icons;
|
||||
TrayService &service;
|
||||
std::map<std::string, std::unique_ptr<TrayIconWidget>> icons;
|
||||
|
||||
sigc::connection m_addConnection;
|
||||
sigc::connection m_removeConnection;
|
||||
sigc::connection m_updateConnection;
|
||||
sigc::connection addConnection;
|
||||
sigc::connection removeConnection;
|
||||
sigc::connection updateConnection;
|
||||
|
||||
void on_item_added(const TrayService::Item &item);
|
||||
void on_item_removed(const std::string &id);
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <string>
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <string>
|
||||
|
||||
class VolumeWidget : public Gtk::Box
|
||||
{
|
||||
class VolumeWidget : public Gtk::Box {
|
||||
public:
|
||||
VolumeWidget();
|
||||
virtual ~VolumeWidget();
|
||||
@@ -18,7 +17,7 @@ class VolumeWidget : public Gtk::Box
|
||||
bool on_timeout();
|
||||
|
||||
private:
|
||||
Gtk::Label m_label;
|
||||
Glib::RefPtr<Gtk::GestureClick> m_click;
|
||||
sigc::connection m_timeoutConn;
|
||||
Gtk::Label label;
|
||||
Glib::RefPtr<Gtk::GestureClick> click;
|
||||
sigc::connection timeoutConn;
|
||||
};
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
|
||||
#include "services/hyprland.hpp"
|
||||
|
||||
class WorkspaceIndicator : public Gtk::Box
|
||||
{
|
||||
class WorkspaceIndicator : public Gtk::Box {
|
||||
public:
|
||||
WorkspaceIndicator(HyprlandService &service, int monitorId);
|
||||
~WorkspaceIndicator() override;
|
||||
|
||||
private:
|
||||
HyprlandService &m_service;
|
||||
int m_monitorId;
|
||||
sigc::connection m_workspaceConnection;
|
||||
sigc::connection m_monitorConnection;
|
||||
HyprlandService &service;
|
||||
int monitorId;
|
||||
sigc::connection workspaceConnection;
|
||||
sigc::connection monitorConnection;
|
||||
|
||||
void rebuild();
|
||||
void on_workspace_update(int monitorId);
|
||||
|
||||
Reference in New Issue
Block a user