Files
bar/include/bar/bar.hpp

40 lines
1.1 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/webWidget.hpp"
#include "widgets/workspaceIndicator.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:
Clock clock;
Date date;
WebWidget homeAssistant{ICON_HOME, "Home Assistant",
"https://home.rivercry.com"};
TrayService &trayService;
HyprlandService &hyprlandService;
int monitorId;
WorkspaceIndicator *workspaceIndicator = nullptr;
TrayWidget *trayWidget = nullptr;
class VolumeWidget *volumeWidget = nullptr;
void setup_ui();
void load_css();
};