mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
river/tags: add module
This commit is contained in:
@ -10,6 +10,9 @@
|
||||
#ifdef HAVE_WLR
|
||||
#include "modules/wlr/taskbar.hpp"
|
||||
#endif
|
||||
#ifdef HAVE_RIVER
|
||||
#include "modules/river/tags.hpp"
|
||||
#endif
|
||||
#if defined(__linux__) && !defined(NO_FILESYSTEM)
|
||||
#include "modules/battery.hpp"
|
||||
#endif
|
||||
|
31
include/modules/river/tags.hpp
Normal file
31
include/modules/river/tags.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
#include "AModule.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "river-status-unstable-v1-client-protocol.h"
|
||||
#include "xdg-output-unstable-v1-client-protocol.h"
|
||||
|
||||
namespace waybar::modules::river {
|
||||
|
||||
class Tags : public waybar::AModule {
|
||||
public:
|
||||
Tags(const std::string &, const waybar::Bar &, const Json::Value &);
|
||||
~Tags();
|
||||
|
||||
// Handlers for wayland events
|
||||
void handle_focused_tags(uint32_t tags);
|
||||
void handle_view_tags(struct wl_array *tags);
|
||||
|
||||
struct zriver_status_manager_v1 *status_manager_;
|
||||
|
||||
private:
|
||||
const waybar::Bar & bar_;
|
||||
Gtk::Box box_;
|
||||
std::vector<Gtk::Button> buttons_;
|
||||
struct zriver_output_status_v1 *output_status_;
|
||||
};
|
||||
|
||||
} /* namespace waybar::modules::river */
|
Reference in New Issue
Block a user