core: add a --systeminfo parameter to gather systeminfo without running

This commit is contained in:
vaxerski
2024-09-25 10:36:43 +01:00
parent 2320b2241c
commit 2a052c69f3
3 changed files with 15 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
#include "Compositor.hpp"
#include "config/ConfigManager.hpp"
#include "init/initHelpers.hpp"
#include "debug/HyprCtl.hpp"
#include <hyprutils/string/String.hpp>
using namespace Hyprutils::String;
@@ -133,6 +134,10 @@ int main(int argc, char** argv) {
std::cout << result;
return 0;
} else if (it->compare("--systeminfo") == 0) {
const auto SYSINFO = systemInfoRequest(eHyprCtlOutputFormat::FORMAT_NORMAL, "");
std::cout << SYSINFO << "\n";
return 0;
} else {
std::cerr << "[ ERROR ] Unknown option '" << it->c_str() << "'!\n";
help();