mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Add a disk module
This commit is contained in:
23
include/modules/disk.hpp
Normal file
23
include/modules/disk.hpp
Normal 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
|
Reference in New Issue
Block a user