mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(config): format modules
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <json/json.h>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <gtkmm.h>
|
||||
@ -14,7 +15,7 @@ namespace waybar::modules {
|
||||
|
||||
class Battery : public IModule {
|
||||
public:
|
||||
Battery();
|
||||
Battery(Json::Value config);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget&();
|
||||
private:
|
||||
@ -22,6 +23,7 @@ namespace waybar::modules {
|
||||
std::vector<fs::path> _batteries;
|
||||
util::SleeperThread _thread;
|
||||
Gtk::Label _label;
|
||||
Json::Value _config;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <thread>
|
||||
@ -10,12 +11,13 @@ namespace waybar::modules {
|
||||
|
||||
class Clock : public IModule {
|
||||
public:
|
||||
Clock();
|
||||
Clock(Json::Value config);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
Gtk::Label _label;
|
||||
waybar::util::SleeperThread _thread;
|
||||
Json::Value _config;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <sys/sysinfo.h>
|
||||
@ -11,12 +12,13 @@ namespace waybar::modules {
|
||||
|
||||
class Cpu : public IModule {
|
||||
public:
|
||||
Cpu();
|
||||
Cpu(Json::Value config);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
Gtk::Label _label;
|
||||
waybar::util::SleeperThread _thread;
|
||||
Json::Value _config;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <sys/sysinfo.h>
|
||||
@ -11,12 +12,13 @@ namespace waybar::modules {
|
||||
|
||||
class Memory : public IModule {
|
||||
public:
|
||||
Memory();
|
||||
Memory(Json::Value config);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
Gtk::Label _label;
|
||||
waybar::util::SleeperThread _thread;
|
||||
Json::Value _config;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user