2019-09-23 22:25:54 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
|
|
|
#include <sys/statvfs.h>
|
2022-04-06 08:37:19 +02:00
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
2021-05-27 15:40:54 +02:00
|
|
|
#include "AButton.hpp"
|
2019-09-23 22:25:54 +02:00
|
|
|
#include "util/format.hpp"
|
2022-04-06 08:37:19 +02:00
|
|
|
#include "util/sleeper_thread.hpp"
|
2019-09-23 22:25:54 +02:00
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
2021-05-27 15:40:54 +02:00
|
|
|
class Disk : public AButton {
|
2019-09-23 22:25:54 +02:00
|
|
|
public:
|
|
|
|
Disk(const std::string&, const Json::Value&);
|
|
|
|
~Disk() = default;
|
|
|
|
auto update() -> void;
|
|
|
|
|
|
|
|
private:
|
|
|
|
util::SleeperThread thread_;
|
|
|
|
std::string path_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace waybar::modules
|