Very basic hypr window title module

This commit is contained in:
vaxerski
2022-04-02 21:08:43 +02:00
parent d4a07483b2
commit e094480684
7 changed files with 174 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#pragma once
#define HAVE_HYPR
#include <json/json.h>
#ifdef HAVE_LIBDATE
#include "modules/clock.hpp"
@ -19,6 +21,9 @@
#ifdef HAVE_RIVER
#include "modules/river/tags.hpp"
#endif
#ifdef HAVE_HYPR
#include "modules/hypr/window.hpp"
#endif
#if defined(__linux__) && !defined(NO_FILESYSTEM)
#include "modules/battery.hpp"
#endif

View File

@ -0,0 +1,22 @@
#pragma once
#include <fmt/format.h>
#include <sigc++/sigc++.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <cstring>
#include <fstream>
#include <memory>
#include <mutex>
#include <spdlog/spdlog.h>
#include "bar.hpp"
#include "client.hpp"
namespace waybar::modules::hypr {
std::string makeRequest(std::string);
} // namespace waybar::modules::hypr

View File

@ -0,0 +1,23 @@
#pragma once
#include <fmt/format.h>
#include <fstream>
#include <sys/statvfs.h>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
#include "util/format.hpp"
#include "ipc.hpp"
namespace waybar::modules::hypr {
class Window : public ALabel {
public:
Window(const std::string&, const Json::Value&);
~Window() = default;
auto update() -> void;
private:
util::SleeperThread thread_;
};
} // namespace waybar::modules::hypr