Revert "feat: add default config path"

This reverts commit 6021ec89f5.
This commit is contained in:
2025-12-27 13:12:02 +01:00
parent e8891983d9
commit 3052bb199f

View File

@@ -57,7 +57,7 @@ std::pair<int, int> mapKeyEventToRowColumn(int keyEventNumber, const std::unorde
std::string getConfigPathFromCliArguments(int argc, char *argv[])
{
std::string configPath = "";
std::string configPath = "config.yaml";
int opt;
while ((opt = getopt(argc, argv, "c:")) != -1)
{
@@ -67,12 +67,16 @@ std::string getConfigPathFromCliArguments(int argc, char *argv[])
configPath = optarg;
break;
default:
std::cout << "No config path provided. Using default config path: $HOME/.config/UsbMakroBoard.yaml\n";
configPath = "$HOME/.config/UsbMakroBoard.yaml";
std::cerr << "Usage: " << argv[0] << " [-c config_file_path]\n";
exit(EXIT_FAILURE);
}
}
return configPath;
}
return configPath;
YAML::Node loadConfig(const std::string &configPath)
{
return YAML::LoadFile(configPath);
}
int openDevice(const std::string &devicePath)