mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1667 from asas1asas200/zeng-feat-sway_scratchpad
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#ifdef HAVE_SWAY
|
||||
#include "modules/sway/language.hpp"
|
||||
#include "modules/sway/mode.hpp"
|
||||
#include "modules/sway/scratchpad.hpp"
|
||||
#include "modules/sway/window.hpp"
|
||||
#include "modules/sway/workspaces.hpp"
|
||||
#endif
|
||||
|
35
include/modules/sway/scratchpad.hpp
Normal file
35
include/modules/sway/scratchpad.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include "ALabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "client.hpp"
|
||||
#include "modules/sway/ipc/client.hpp"
|
||||
#include "util/json.hpp"
|
||||
|
||||
namespace waybar::modules::sway {
|
||||
class Scratchpad : public ALabel {
|
||||
public:
|
||||
Scratchpad(const std::string&, const Json::Value&);
|
||||
~Scratchpad() = default;
|
||||
auto update() -> void;
|
||||
|
||||
private:
|
||||
auto getTree() -> void;
|
||||
auto onCmd(const struct Ipc::ipc_response&) -> void;
|
||||
auto onEvent(const struct Ipc::ipc_response&) -> void;
|
||||
|
||||
std::string tooltip_format_;
|
||||
bool show_empty_;
|
||||
bool tooltip_enabled_;
|
||||
std::string tooltip_text_;
|
||||
int count_;
|
||||
std::mutex mutex_;
|
||||
Ipc ipc_;
|
||||
util::JsonParser parser_;
|
||||
};
|
||||
} // namespace waybar::modules::sway
|
Reference in New Issue
Block a user