Add a disk module

This commit is contained in:
Guillaume Maudoux
2019-09-23 22:25:54 +02:00
parent 4667afaa98
commit 1d39ef5c8e
8 changed files with 126 additions and 20 deletions

23
include/modules/disk.hpp Normal file
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"
namespace waybar::modules {
class Disk : public ALabel {
public:
Disk(const std::string&, const Json::Value&);
~Disk() = default;
auto update() -> void;
private:
util::SleeperThread thread_;
std::string path_;
};
} // namespace waybar::modules