2019-09-23 20:25:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
|
|
|
#include <sys/statvfs.h>
|
2022-04-06 06:37:19 +00:00
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
2022-11-24 11:28:52 +00:00
|
|
|
#include "ALabel.hpp"
|
2019-09-23 20:25:54 +00:00
|
|
|
#include "util/format.hpp"
|
2022-04-06 06:37:19 +00:00
|
|
|
#include "util/sleeper_thread.hpp"
|
2019-09-23 20:25:54 +00:00
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
2022-11-24 11:28:52 +00:00
|
|
|
class Disk : public ALabel {
|
2019-09-23 20:25:54 +00:00
|
|
|
public:
|
|
|
|
Disk(const std::string&, const Json::Value&);
|
2023-03-02 13:57:07 +00:00
|
|
|
virtual ~Disk() = default;
|
|
|
|
auto update() -> void override;
|
2019-09-23 20:25:54 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
util::SleeperThread thread_;
|
|
|
|
std::string path_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace waybar::modules
|