-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleviathan_config.hpp
43 lines (31 loc) · 973 Bytes
/
leviathan_config.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef LEVIATHAN_CONFIG_H
#define LEVIATHAN_CONFIG_H
#include "constants.h"
#include <functional>
#include <map>
#include <string>
#define DEFAULT_RED 0xFF0000
using LineFunction = std::function<int32_t(int32_t)>;
enum class TempSource { CPU, LIQUID };
inline TempSource stringToTempSource(const std::string &tss) {
return tss == "liquid" ? TempSource::LIQUID : TempSource::CPU;
}
struct Point {
int32_t x;
int32_t y;
Point(int32_t __x, int32_t __y) : x(__x), y(__y) {}
};
struct leviathan_config {
// Fan/pump profile
TempSource temp_source_{TempSource::CPU};
std::map<int32_t, LineFunction> fan_profile_;
std::map<int32_t, LineFunction> pump_profile_;
// conky integration
std::string conky_file_{kDefaultConkyFile};
// Color settings
uint32_t main_color_{DEFAULT_RED};
// Interval settings
uint32_t interval_{500};
};
leviathan_config parse_config_file(const char *const path);
#endif // LEVIATHAN_CONFIG_H