2020-10-10 14:09:55 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fmt/chrono.h>
|
2022-07-13 07:20:49 +02:00
|
|
|
|
2022-11-24 12:28:52 +01:00
|
|
|
#include "ALabel.hpp"
|
2020-10-10 14:09:55 +02:00
|
|
|
#include "util/sleeper_thread.hpp"
|
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
2022-11-24 12:28:52 +01:00
|
|
|
class Clock : public ALabel {
|
2020-10-10 14:09:55 +02:00
|
|
|
public:
|
|
|
|
Clock(const std::string&, const Json::Value&);
|
2023-03-02 14:57:07 +01:00
|
|
|
virtual ~Clock() = default;
|
|
|
|
auto update() -> void override;
|
2020-10-10 14:09:55 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
util::SleeperThread thread_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace waybar::modules
|