Files
bar/include/bar/bar.hpp

48 lines
1.3 KiB
C++

#pragma once
#include <gtk4-layer-shell/gtk4-layer-shell.h>
#include <gtkmm.h>
#include "icons.hpp"
#include "services/hyprland.hpp"
#include "services/tray.hpp"
#include "widgets/clock.hpp"
#include "widgets/date.hpp"
#include "widgets/tray.hpp"
#include "widgets/volumeWidget.hpp"
#include "widgets/webWidget.hpp"
#include "widgets/workspaceIndicator.hpp"
#include "widgets/controlCenter.hpp"
class Bar : public Gtk::Window {
public:
Bar(GdkMonitor *monitor, HyprlandService &hyprlandService, TrayService &trayService, int monitorId);
protected:
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:
int monitorId;
Clock clock;
Date date;
WebWidget homeAssistant{ICON_HOME, "Home Assistant", "https://home.rivercry.com"};
ControlCenter controlCenter{"\ue8bb", "Control Center"};
WorkspaceIndicator *workspaceIndicator = nullptr;
TrayWidget *trayWidget = nullptr;
VolumeWidget *volumeWidget = nullptr;
TrayService &trayService;
HyprlandService &hyprlandService;
void setup_ui();
void setup_left_box();
void setup_center_box();
void setup_right_box();
void load_css();
};