mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-30 15:32:43 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			441 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			441 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <fmt/format.h>
 | |
| #include <fstream>
 | |
| #include "util/chrono.hpp"
 | |
| #include "ALabel.hpp"
 | |
| 
 | |
| namespace waybar::modules {
 | |
| 
 | |
| class Memory : public ALabel {
 | |
|   public:
 | |
|     Memory(const Json::Value&);
 | |
|     auto update() -> void;
 | |
|   private:
 | |
|     static inline const std::string data_dir_ = "/proc/meminfo";
 | |
|     unsigned long memtotal_;
 | |
|     unsigned long memfree_;
 | |
|     void parseMeminfo();
 | |
|     waybar::util::SleeperThread thread_;
 | |
| };
 | |
| 
 | |
| }
 | 
