logmeow/config.h

24 lines
600 B
C
Raw Normal View History

#pragma once
#include <string>
#include <nlohmann/json.hpp>
#include "filters.h"
2023-02-03 08:15:54 +00:00
const constexpr char* default_logcat_command = "adb logcat -Dv 'threadtime epoch UTC uid'";
struct Config {
std::string logcat_command;
2023-01-08 16:12:22 +00:00
float normal_font_size = 13.0f;
float monospace_font_size = 13.0f;
Filters filters;
2023-02-01 15:22:08 +00:00
Filters exclusions;
};
std::string get_config_folder();
void create_config_folders_if_necessary();
void from_json(const nlohmann::json& j, Config& config);
Config load_config();
void to_json(nlohmann::json& j, const Config& config);
void write_config(const Config& config);