mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
712424f9a8
In file included from ../src/factory.cpp:1: In file included from ../include/factory.hpp:4: ../include/modules/clock.hpp:5:10: fatal error: 'fmt/time.h' file not found #include "fmt/time.h" ^~~~~~~~~~~~ In file included from ../src/bar.cpp:4: In file included from ../include/factory.hpp:4: In file included from ../include/modules/clock.hpp:3: In file included from /usr/include/fmt/chrono.h:12: /usr/include/fmt/locale.h:19:35: error: parameter type 'fmt::v5::internal::buffer' (aka 'basic_buffer<char>') is an abstract class const std::locale& loc, buffer<Char>& buf, ^ /usr/include/spdlog/fmt/bundled/core.h:238:16: note: unimplemented pure virtual method 'grow' in 'basic_buffer' virtual void grow(std::size_t capacity) = 0; ^ In file included from ../src/modules/sni/host.cpp:3: /usr/include/fmt/ostream.h:22:9: error: expected member name or ';' after declaration specifiers buffer<Char>& buffer_; ~~~~~~^ /usr/include/fmt/ostream.h:25:19: error: expected ')' formatbuf(buffer<Char>& buf) : buffer_(buf) {} ^ /usr/include/fmt/ostream.h:25:12: note: to match this '(' formatbuf(buffer<Char>& buf) : buffer_(buf) {} ^ /usr/include/fmt/ostream.h:25:42: error: use of undeclared identifier 'buf'; did you mean 'prettify_handler::buf'? formatbuf(buffer<Char>& buf) : buffer_(buf) {} ^~~ prettify_handler::buf /usr/include/spdlog/fmt/bundled/format-inl.h:551:11: note: 'prettify_handler::buf' declared here buffer &buf; ^
25 lines
421 B
C++
25 lines
421 B
C++
#pragma once
|
|
|
|
#include <fmt/format.h>
|
|
#if FMT_VERSION < 60000
|
|
#include <fmt/time.h>
|
|
#else
|
|
#include <fmt/chrono.h>
|
|
#endif
|
|
#include "ALabel.hpp"
|
|
#include "util/sleeper_thread.hpp"
|
|
|
|
namespace waybar::modules {
|
|
|
|
class Clock : public ALabel {
|
|
public:
|
|
Clock(const std::string&, const Json::Value&);
|
|
~Clock() = default;
|
|
auto update() -> void;
|
|
|
|
private:
|
|
util::SleeperThread thread_;
|
|
};
|
|
|
|
} // namespace waybar::modules
|