feat: multiple bar with same process

This commit is contained in:
Alex
2019-04-25 13:25:06 +02:00
parent 9504b7ac03
commit 79a5e9ecee
4 changed files with 62 additions and 48 deletions

View File

@ -18,12 +18,11 @@ struct waybar_output {
std::string name;
uint32_t wl_name;
struct zxdg_output_v1 *xdg_output;
Json::Value config;
};
class Bar {
public:
Bar(struct waybar_output *w_output);
Bar(struct waybar_output *w_output, const Json::Value&);
Bar(const Bar &) = delete;
~Bar() = default;
@ -31,6 +30,7 @@ class Bar {
void handleSignal(int);
struct waybar_output * output;
Json::Value config;
Gtk::Window window;
struct wl_surface * surface;
struct zwlr_layer_surface_v1 *layer_surface;

View File

@ -33,6 +33,8 @@ class Client {
bool isValidOutput(const Json::Value &config, std::unique_ptr<struct waybar_output> &output);
auto setupConfig() -> void;
auto setupCss() -> void;
std::unique_ptr<struct waybar_output>& getOutput(uint32_t wl_name);
std::vector<Json::Value> getOutputConfigs(std::unique_ptr<struct waybar_output> &output);
static void handleGlobal(void *data, struct wl_registry *registry, uint32_t name,
const char *interface, uint32_t version);