2018-08-08 21:54:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <gtkmm.h>
|
|
|
|
#include <wayland-client.h>
|
|
|
|
|
|
|
|
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
|
2018-08-08 23:10:07 +00:00
|
|
|
#include "idle-client-protocol.h"
|
2018-08-08 21:54:58 +00:00
|
|
|
|
|
|
|
#include "util/ptr_vec.hpp"
|
|
|
|
|
|
|
|
#include <gdk/gdkwayland.h>
|
|
|
|
|
|
|
|
#include "bar.hpp"
|
|
|
|
|
|
|
|
namespace waybar {
|
|
|
|
|
|
|
|
struct Client {
|
|
|
|
uint32_t height = 30;
|
2018-08-09 10:05:48 +00:00
|
|
|
std::string cssFile = "./resources/style.css";
|
|
|
|
std::string configFile = "./resources/config";
|
2018-08-08 21:54:58 +00:00
|
|
|
|
|
|
|
Gtk::Main gtk_main;
|
|
|
|
|
|
|
|
Glib::RefPtr<Gdk::Display> gdk_display;
|
|
|
|
struct wl_display *wlDisplay;
|
|
|
|
struct wl_registry *registry;
|
|
|
|
struct zwlr_layer_shell_v1 *layer_shell;
|
2018-08-08 23:10:07 +00:00
|
|
|
struct org_kde_kwin_idle *idle_manager;
|
|
|
|
struct wl_seat *seat;
|
2018-08-08 21:54:58 +00:00
|
|
|
util::ptr_vec<Bar> bars;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
sigc::signal<void(int, int)> workspace_state;
|
|
|
|
sigc::signal<void(std::string)> focused_window_name;
|
|
|
|
} signals;
|
|
|
|
|
|
|
|
Client(int argc, char* argv[]);
|
|
|
|
void bind_interfaces();
|
|
|
|
auto setup_css();
|
|
|
|
int main(int argc, char* argv[]);
|
|
|
|
};
|
|
|
|
}
|