2023-01-29 15:47:50 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2023-02-10 16:20:26 +00:00
|
|
|
class Config
|
2023-01-29 15:47:50 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-02-10 16:20:26 +00:00
|
|
|
std::string cpuThermalZone = ""; // idk, no standard way of doing this.
|
|
|
|
std::string networkAdapter = "eno1"; // Is this standard?
|
2023-01-29 15:47:50 +00:00
|
|
|
std::string suspendCommand = "systemctl suspend";
|
2023-02-10 16:20:26 +00:00
|
|
|
std::string lockCommand = ""; // idk, no standard way of doing this.
|
|
|
|
std::string exitCommand = ""; // idk, no standard way of doing this.
|
2023-01-29 15:47:50 +00:00
|
|
|
std::string batteryFolder = ""; // this can be BAT0, BAT1, etc. Usually in /sys/class/power_supply
|
|
|
|
std::vector<std::string> workspaceSymbols = std::vector<std::string>(9, "");
|
|
|
|
std::string defaultWorkspaceSymbol = "";
|
|
|
|
|
2023-01-29 20:31:00 +00:00
|
|
|
bool centerTime = true;
|
2023-02-04 14:07:05 +00:00
|
|
|
bool audioRevealer = false;
|
2023-02-10 16:20:26 +00:00
|
|
|
bool networkWidget = true;
|
2023-02-12 13:57:32 +00:00
|
|
|
bool workspaceScrollOnMonitor = true; // Scroll through workspaces on monitor instead of all
|
|
|
|
bool workspaceScrollInvert = false; // Up = +1, instead of Up = -1
|
2023-02-10 16:20:26 +00:00
|
|
|
|
|
|
|
// Controls for color progression of the network widget
|
|
|
|
uint32_t minUploadBytes = 0; // Bottom limit of the network widgets upload. Everything below it is considered "under"
|
|
|
|
uint32_t maxUploadBytes = 4 * 1024 * 1024; // 4 MiB Top limit of the network widgets upload. Everything above it is considered "over"
|
|
|
|
uint32_t minDownloadBytes = 0; // Bottom limit of the network widgets download. Everything above it is considered "under"
|
|
|
|
uint32_t maxDownloadBytes = 10 * 1024 * 1024; // 10 MiB Top limit of the network widgets download. Everything above it is considered "over"
|
2023-01-29 15:47:50 +00:00
|
|
|
|
2023-02-20 22:04:37 +00:00
|
|
|
uint32_t audioScrollSpeed = 5; // 5% each scroll
|
|
|
|
|
2023-01-29 15:47:50 +00:00
|
|
|
static void Load();
|
|
|
|
static const Config& Get();
|
|
|
|
};
|
2023-01-30 15:57:15 +00:00
|
|
|
|
|
|
|
// Configs, that rely on specific files to be available(e.g. Hyprland running)
|
|
|
|
class RuntimeConfig
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
#ifdef WITH_NVIDIA
|
|
|
|
bool hasNvidia = true;
|
|
|
|
#else
|
|
|
|
bool hasNvidia = false;
|
|
|
|
#endif
|
2023-01-30 16:23:28 +00:00
|
|
|
#ifdef WITH_AMD
|
|
|
|
bool hasAMD = true;
|
|
|
|
#else
|
|
|
|
bool hasAMD = false;
|
|
|
|
#endif
|
2023-01-30 15:57:15 +00:00
|
|
|
|
|
|
|
#ifdef WITH_HYPRLAND
|
|
|
|
bool hasHyprland = true;
|
|
|
|
#else
|
|
|
|
bool hasHyprland = false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WITH_BLUEZ
|
|
|
|
bool hasBlueZ = true;
|
|
|
|
#else
|
|
|
|
bool hasBlueZ = false;
|
|
|
|
#endif
|
|
|
|
|
2023-02-12 19:45:05 +00:00
|
|
|
bool hasNet = true;
|
|
|
|
|
2023-01-30 15:57:15 +00:00
|
|
|
static RuntimeConfig& Get();
|
|
|
|
};
|