6 fs::path cwd = fs::current_path();
8 base_path = cwd /
"tests/e2e/current/tmp/arkanjo";
15 return fs::path(*v) / program_name;
18 const char* cache_env = std::getenv(
"XDG_CACHE_HOME");
19 const char* home = std::getenv(
"HOME");
34 std::string_view mode = *v;
35 return (mode ==
"dark") ? config::Theme::Dark : config::Theme::Light;
58void Config::validate() {
60 throw std::runtime_error(
"Could not locate base-path directory");
64 throw std::runtime_error(
"Could not locate third-party directory");
Singleton configuration manager class.
static Config & config()
Gets the singleton configuration instance.
void setDefaultConfig()
Sets default production configuration paths.
void setTestConfig()
Sets test configuration paths.
static bool is_bg_color_dark()
Determines if terminal background color is dark.
Configuration management interface.
#define CONFIG_VALUE(name, fallback_lambda)
std::filesystem::path base_path
Default base path for temporary files.
std::filesystem::path third_party_dir
Directory containing third-party dependencies.
std::string project_version
Current project version.
std::string program_name
Name of the program.
config::Theme theme
Current terminal theme.